You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/mnt/project/mmocr/tools/train.py", line 114, in
main()
File "/mnt/project/mmocr/tools/train.py", line 110, in main
runner.train()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1777, in train
model = self.train_loop.run() # type: ignore
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 102, in run
self.runner.val_loop.run()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 371, in run
self.run_iter(idx, data_batch)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 394, in run_iter
self.runner.call_hook(
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1841, in call_hook
raise TypeError(f'{e} in {hook}') from None
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first. in <mmocr.engine.hooks.visualization_hook.VisualizationHook object at 0x7f01f55f6080>
Additional information
No response
The text was updated successfully, but these errors were encountered:
Prerequisite
Task
I'm using the official example scripts/configs for the officially supported tasks/models/datasets.
Branch
main branch https://github.com/open-mmlab/mmocr
Environment
Package Version
addict 2.4.0
asynctest 0.13.0
attrs 23.2.0
boto3 1.34.79
botocore 1.34.79
certifi 2024.2.2
charset-normalizer 3.3.2
clearml 1.15.0
click 8.1.7
codecov 2.1.13
colorama 0.4.6
contourpy 1.2.1
coverage 7.4.4
cycler 0.12.1
exceptiongroup 1.2.0
flake8 7.0.0
fonttools 4.51.0
furl 2.1.3
idna 3.6
imageio 2.34.0
imgaug 0.4.0
importlib_metadata 7.1.0
iniconfig 2.0.0
interrogate 1.5.0
isort 5.13.2
jmespath 1.0.1
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
kiwisolver 1.4.5
kwarray 0.6.18
lanms_neo 1.0.2
lazy_loader 0.4
lmdb 1.4.1
markdown-it-py 3.0.0
matplotlib 3.8.4
mccabe 0.7.0
mdurl 0.1.2
mmcv 2.0.1
mmdet 3.1.0
mmengine 0.10.3
mmocr 1.0.1
networkx 3.3
numpy 1.26.4
opencv-python 4.9.0.80
orderedmultidict 1.0.1
packaging 24.0
parameterized 0.9.0
pathlib2 2.3.7.post1
pillow 10.3.0
pip 23.3.1
platformdirs 4.2.0
pluggy 1.4.0
psutil 5.9.8
py 1.11.0
pyclipper 1.3.0.post5
pycocotools 2.0.7
pycodestyle 2.11.1
pyflakes 3.2.0
Pygments 2.17.2
PyJWT 2.8.0
pyparsing 3.1.2
pytest 8.1.1
pytest-cov 5.0.0
pytest-runner 6.0.1
python-dateutil 2.9.0.post0
PyYAML 6.0.1
rapidfuzz 3.8.0
referencing 0.34.0
requests 2.31.0
rich 13.7.1
rpds-py 0.18.0
s3transfer 0.10.1
scikit-image 0.22.0
scipy 1.13.0
setuptools 68.2.2
shapely 2.0.3
six 1.16.0
tabulate 0.9.0
termcolor 2.4.0
terminaltables 3.1.10
tifffile 2024.2.12
toml 0.10.2
tomli 2.0.1
torch 1.13.1+cu117
torchaudio 0.13.1+cu117
torchvision 0.14.1+cu117
tqdm 4.66.2
typing_extensions 4.11.0
ubelt 1.3.5
urllib3 2.2.1
wheel 0.41.2
xdoctest 1.1.3
yapf 0.40.2
zipp 3.18.1
Reproduces the problem - code sample
Reproduces the problem - command or script
Reproduces the problem - error message
Traceback (most recent call last):
File "/mnt/project/mmocr/tools/train.py", line 114, in
main()
File "/mnt/project/mmocr/tools/train.py", line 110, in main
runner.train()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1777, in train
model = self.train_loop.run() # type: ignore
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 102, in run
self.runner.val_loop.run()
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 371, in run
self.run_iter(idx, data_batch)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/loops.py", line 394, in run_iter
self.runner.call_hook(
File "/data/conda/envs/mmocr/lib/python3.10/site-packages/mmengine/runner/runner.py", line 1841, in call_hook
raise TypeError(f'{e} in {hook}') from None
TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first. in <mmocr.engine.hooks.visualization_hook.VisualizationHook object at 0x7f01f55f6080>
Additional information
No response
The text was updated successfully, but these errors were encountered: