The error is as follows:
Traceback (most recent call last):
File "main.py", line 23, in <module>
t.train()
File "c:\Paper Code\RCAN-master-Real\RCAN_TrainCode\code\trainer.py", line 51, in train
sr = self.model(lr, idx_scale)
File "C:\Anaconda3\envs\pytorch0.4.0\lib\site-packages\torch\nn\modules\module.py", line 491, in __call__
result = self.forward(*input, **kwargs)
File "c:\Paper Code\RCAN-master-Real\RCAN_TrainCode\code\model\__init__.py", line 54, in forward
return self.model(x)
File "C:\Anaconda3\envs\pytorch0.4.0\lib\site-packages\torch\nn\modules\module.py", line 491, in __call__
result = self.forward(*input, **kwargs)
File "c:\Paper Code\RCAN-master-Real\RCAN_TrainCode\code\model\rcan.py", line 107, in forward
x = self.sub_mean(x)
File "C:\Anaconda3\envs\pytorch0.4.0\lib\site-packages\torch\nn\modules\module.py", line 491, in __call__
result = self.forward(*input, **kwargs)
File "C:\Anaconda3\envs\pytorch0.4.0\lib\site-packages\torch\nn\modules\conv.py", line 301, in forward
self.padding, self.dilation, self.groups)
RuntimeError: CUDNN_STATUS_EXECUTION_FAILED
Before code modification:
if __name__ == '__main__':
torch.manual_seed(args.seed)
checkpoint = utility.checkpoint(args)
if checkpoint.ok:
loader = data.Data(args)
model = model.Model(args, checkpoint)
loss = loss.Loss(args, checkpoint) if not args.test_only else None
t = Trainer(args, loader, model, loss, checkpoint)
while not t.terminate():
t.train()
t.test()
checkpoint.done()
After code modification
if __name__ == '__main__':
torch.backends.cudnn.enabled = False
torch.manual_seed(args.seed)
checkpoint = utility.checkpoint(args)
if checkpoint.ok:
loader = data.Data(args)
model = model.Model(args, checkpoint)
loss = loss.Loss(args, checkpoint) if not args.test_only else None
t = Trainer(args, loader, model, loss, checkpoint)
while not t.terminate():
t.train()
t.test()
checkpoint.done()
Running ~ ~
Read More:
- [Solved] RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- Error using tensorflow GPU: could not create cudnn handle: cudnn_STATUS_NOT_INITIALIZED
- Tensorflow Error: Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- Tensorflow Run Error or the interface is stuck or report error: Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
- [Solved] RuntimeError: CUDA error: CUBLAS_STATUS_ALLOC_FAILED when calling `cublasCreate(handle)`
- [Solved] TF2.4 Error: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,
- [Solved] Failed to get convolution algorithm. This is probably because cuDNN failed to initialize
- Hive Statement Error During Execution: Error while processing statement: FAILED: Execution Error, return code 2 from o
- [Solved] Tensorflow Error: failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
- Execution failed for task ‘:app:processDebugMainManifest‘.> Manifest merger failed : Apps targeting
- [Solved] Execution failed for task ‘:app:checkDebugAarMetadata‘
- [Solved] Execution failed for task ‘:app:mergeDebugJavaResource‘.
- Execution failed for task ‘:app:kaptDebugKotlin‘ [How to Solve]
- Android studio Error:Execution failed for task ‘: app:transformResourcesWithMergeJavaResForDebug ‘
- [Solved] torch Do Targer Detection Error: RuntimeError: CUDA error: device-side assert triggered
- [Solved] Android Error: Execution failed for task ‘:app:mergeReleaseNativeLibs‘.
- [Solved] Android Studio Compile Error: Execution failed for task ‘:APP_MIDI:lintVitalRelease‘.
- [Solved] Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and