fixed an error when testing and training the model on a custom dataset.
"
Traceback (most recent call last):
File "test.py", line 319, in
test(opt.data,
File "test.py", line 226, in test
plot_images(img, output_to_target(output, width, height), paths, f, names) # predictions
File "/yolor/utils/plots.py", line 109, in output_to_target
return np.array(targets)
File "/opt/conda/lib/python3.8/site-packages/torch/_tensor.py", line 721, in array
return self.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
"
fixed an error when testing and training the model on a custom dataset. " Traceback (most recent call last): File "test.py", line 319, in
test(opt.data,
File "test.py", line 226, in test
plot_images(img, output_to_target(output, width, height), paths, f, names) # predictions
File "/yolor/utils/plots.py", line 109, in output_to_target
return np.array(targets)
File "/opt/conda/lib/python3.8/site-packages/torch/_tensor.py", line 721, in array
return self.numpy()
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
"