Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed function return type error 'output_to_target' #286

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KotovNikitaStudent
Copy link

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.
"

@KotovNikitaStudent
Copy link
Author

fixed an error when testing and training the model on a custom dataset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant