Skip to content

fixed function return type error 'output_to_target'#286

Open
KotovNikitaStudent wants to merge 1 commit intoWongKinYiu:mainfrom
KotovNikitaStudent:main
Open

fixed function return type error 'output_to_target'#286
KotovNikitaStudent wants to merge 1 commit intoWongKinYiu:mainfrom
KotovNikitaStudent:main

Conversation

@KotovNikitaStudent
Copy link
Copy Markdown

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
Copy Markdown
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.

1 participant