在CNN的forward 中
可能的原因是
在 out += residual 中 out 和 residual 的维度不一致。
一长串的这个:
/opt/conda/conda-bld/pytorch_1607370156314/work/aten/src/ATen/native/cuda/IndexKernel.cu:84: operator(): block: [1698,0,0], thread: [30,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
/opt/conda/conda-bld/pytorch_1607370156314/work/aten/src/ATen/native/cuda/IndexKernel.cu:84: operator(): block: [1698,0,0], thread: [31,0,0] Assertion `index >= -sizes[i] && index < sizes[i] && "index out of bounds"` failed.
出现的错误:
Traceback (most recent call last):
File "python3.7/site-packages/pytorch_lightning/trainer/trainer.py", line 470, in fit
results = self.accelerator_backend.train()
File "python3.7/site-packages/pytorch_lightning/accelerators/gpu_accelerator.py", line 65, in train
self.trainer.train_loop.setup_training(model)
File "python3.7/site-packages/pytorch_lightning/trainer/training_loop.py", line 175, in setup_training
self.trainer.checkpoint_connector.restore_weights(model)
File "python3.7/site-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 55, in restore_weights
torch.cuda.empty_cache()
File "python3.7/site-packages/torch/cuda/memory.py", line 87, in empty_cache
torch._C._cuda_emptyCache()
RuntimeError: CUDA error: device-side assert triggered