Complete error with torch.nn.DataParallel. I replaced some directory names with “HOME” and “PATH_TO_SCRIPT”.
RuntimeError: chunk expects at least a 1-dimensional tensor (chunk at /pytorch/aten/src/ATen/native/TensorShape.cpp:188)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x33 (0x7f3c89d6f273 in HOME/.local/lib/python3.6/site-packages/torch/lib/libc10.so)
frame #1: at::native::chunk(at::Tensor const&, long, long) + 0x2ff (0x7f3c1a3ac0cf in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch.so)
frame #2: at::TypeDefault::chunk(at::Tensor const&, long, long) + 0x9 (0x7f3c1a6d4f99 in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch.so)
frame #3: torch::autograd::VariableType::chunk(at::Tensor const&, long, long) + 0x29a (0x7f3c1bfbfcca in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch.so)
frame #4: torch::cuda::scatter(at::Tensor const&, c10::ArrayRef, c10::optional<std::vector<long, std::allocator > > const&, long, c10::optional<std::vector<c10::optionalc10::cuda::CUDAStream, std::allocator<c10::optionalc10::cuda::CUDAStream > > > const&) + 0x3e1 (0x7f3c1ca938d1 in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch.so)
frame #5:  + 0x5f3d8f (0x7f3c8afb6d8f in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #6:  + 0x1d3ef4 (0x7f3c8ab96ef4 in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #7: /usr/bin/python3.6() [0x50746c]
frame #8: _PyEval_EvalFrameDefault + 0x4dd (0x507edd in /usr/bin/python3.6)
frame #9: /usr/bin/python3.6() [0x504e80]
frame #10: /usr/bin/python3.6() [0x506ac3]
frame #11: /usr/bin/python3.6() [0x507330]
frame #12: _PyEval_EvalFrameDefault + 0x4dd (0x507edd in /usr/bin/python3.6)
frame #13: /usr/bin/python3.6() [0x504e80]
frame #14: /usr/bin/python3.6() [0x56cbbb]
frame #15: PyObject_Call + 0x3e (0x59fcee in /usr/bin/python3.6)
frame #16: THPFunction_apply(_object*, _object*) + 0x9df (0x7f3c8adb791f in HOME/.local/lib/python3.6/site-packages/torch/lib/libtorch_python.so)
frame #17: /usr/bin/python3.6() [0x507217]
frame #18: _PyEval_EvalFrameDefault + 0x4dd (0x507edd in /usr/bin/python3.6)
frame #19: /usr/bin/python3.6() [0x5057d7]
frame #20: _PyFunction_FastCallDict + 0xe8 (0x4531d8 in /usr/bin/python3.6)
frame #21: _PyObject_FastCallDict + 0x291 (0x59f051 in /usr/bin/python3.6)
frame #22: /usr/bin/python3.6() [0x5c377c]
frame #23: PySequence_Tuple + 0x1fc (0x5a10dc in /usr/bin/python3.6)
frame #24: _PyEval_EvalFrameDefault + 0x5d41 (0x50d741 in /usr/bin/python3.6)
frame #25: /usr/bin/python3.6() [0x5057d7]
frame #26: _PyFunction_FastCallDict + 0xe8 (0x4531d8 in /usr/bin/python3.6)
frame #27: _PyObject_FastCallDict + 0x291 (0x59f051 in /usr/bin/python3.6)
frame #28: /usr/bin/python3.6() [0x5c377c]
frame #29: PySequence_Tuple + 0x222 (0x5a1102 in /usr/bin/python3.6)
frame #30: _PyEval_EvalFrameDefault + 0x5d41 (0x50d741 in /usr/bin/python3.6)
frame #31: /usr/bin/python3.6() [0x5057d7]
frame #32: _PyFunction_FastCallDict + 0xe8 (0x4531d8 in /usr/bin/python3.6)
frame #33: _PyObject_FastCallDict + 0x291 (0x59f051 in /usr/bin/python3.6)
frame #34: /usr/bin/python3.6() [0x5c377c]
frame #35: PySequence_Tuple + 0x19b (0x5a107b in /usr/bin/python3.6)
frame #36: _PyEval_EvalFrameDefault + 0x5d41 (0x50d741 in /usr/bin/python3.6)
frame #37: /usr/bin/python3.6() [0x5057d7]
frame #38: _PyFunction_FastCallDict + 0xe8 (0x4531d8 in /usr/bin/python3.6)
frame #39: _PyObject_FastCallDict + 0x291 (0x59f051 in /usr/bin/python3.6)
frame #40: /usr/bin/python3.6() [0x5c377c]
frame #41: PySequence_Tuple + 0x1fc (0x5a10dc in /usr/bin/python3.6)
frame #42: _PyEval_EvalFrameDefault + 0x5d41 (0x50d741 in /usr/bin/python3.6)
frame #43: /usr/bin/python3.6() [0x5057d7]
frame #44: /usr/bin/python3.6() [0x506ac3]
frame #45: /usr/bin/python3.6() [0x507330]
frame #46: _PyEval_EvalFrameDefault + 0x4dd (0x507edd in /usr/bin/python3.6)
frame #47: /usr/bin/python3.6() [0x5057d7]
frame #48: /usr/bin/python3.6() [0x506ac3]
frame #49: /usr/bin/python3.6() [0x507330]
frame #50: _PyEval_EvalFrameDefault + 0x4dd (0x507edd in /usr/bin/python3.6)
frame #51: /usr/bin/python3.6() [0x504e80]
frame #52: /usr/bin/python3.6() [0x506ac3]
frame #53: /usr/bin/python3.6() [0x507330]
frame #54: _PyEval_EvalFrameDefault + 0x1548 (0x508f48 in /usr/bin/python3.6)
frame #55: /usr/bin/python3.6() [0x5064e4]
frame #56: /usr/bin/python3.6() [0x507330]
frame #57: _PyEval_EvalFrameDefault + 0x4dd (0x507edd in /usr/bin/python3.6)
frame #58: /usr/bin/python3.6() [0x504e80]
frame #59: /usr/bin/python3.6() [0x5b9928]
frame #60: PyObject_Call + 0x3e (0x59fcee in /usr/bin/python3.6)
frame #61: _PyEval_EvalFrameDefault + 0x1ab3 (0x5094b3 in /usr/bin/python3.6)
frame #62: /usr/bin/python3.6() [0x504e80]
frame #63: /usr/bin/python3.6() [0x5b96f0]

PATH_TO_SCRIPT/train_faster_rcnn.py(78)()
-> train_one_epoch(parallel_model, optimizer, train_dataloader, device, curr_epoch, 100)