Traceback (most recent call last):


 "demo.py", line 7, in <module>

detector = CornerNet_Saccade()


 "/home/qing/ngs/CornerNet-Lite/core/detectors.py", line 49, in __init__

super(CornerNet_Saccade, self).__init__(coco, cornernet, cornernet_saccade_inference, model=model_path)


 "/home/qing/ngs/CornerNet-Lite/core/base.py", line 14, in __init__

self._nnet.load_pretrained_params(model)


 "/home/qing/ngs/CornerNet-Lite/core/nnet/py_factory.py", line 123, in load_pretrained_params

params = torch.load(f)


 "/home/qing/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/serialization.py", line 367, in load

return _load(f, map_location, pickle_module)


 "/home/qing/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/serialization.py", line 538, in _load

result = unpickler.load()


 "/home/qing/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/serialization.py", line 504, in persistent_load

data_type(size), location)


 "/home/qing/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/serialization.py", line 113, in default_restore_location

result = fn(storage, location)


 "/home/qing/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/serialization.py", line 94, in _cuda_deserialize

device = validate_cuda_device(location)


 "/home/qing/anaconda3/envs/CornerNet_Lite/lib/python3.7/site-packages/torch/serialization.py", line 78, in validate_cuda_device

raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location='cpu' to map your storages to the CPU.

Traceback (most recent call last):


 "/home/qw/github/ObjectDetect/pytorch-YOLOv4-master/train.py", line 453, in <module>

device=device, )


 "/home/qw/github/ObjectDetect/pytorch-YOLOv4-master/train.py", line 331, in train

loss.backward()


 "/home/qw/.local/lib/python3.6/site-packages/torch/tensor.py", line 118, in backward

torch.autograd.backward(self, gradient, retain_graph, create_graph)


 "/home/qw/.local/lib/python3.6/site-packages/torch/autograd/__init__.py", line 93, in backward

allow_unreachable=True)
# allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [1, 3, 19, 19, 7]], which is output 0 of torch::autograd::CopySlices, is at version 7; expected version 4 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!
