microsoft / unilm

Large-scale Self-supervised Pre-training Across Tasks, Languages, and Modalities

Home Page:https://aka.ms/GeneralAI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

what(): std::bad_alloc

jigsawcoder opened this issue · comments

I am using ICDAR 2019 cTDaR (Table Detection), DiT-base Cascade R-CNN to train my custom dataset.
I tried to inference the given model:
https://layoutlm.blob.core.windows.net/dit/dit-fts/icdar19modern_dit-b_cascade.pth
on my custom data as given below:
python inference.py --image_path /content/drive/MyDrive/table_celldetection/3.png --output_file_name /content/drive/MyDrive/tablecell_dit/3_new.png --config /content/drive/MyDrive/tablecell_dit/unilm/dit/object_detection/icdar19_configs/cascade/cascade_dit_base.yaml --opts MODEL.WEIGHTS https://layoutlm.blob.core.windows.net/dit/dit-fts/icdar19archival_dit-b_cascade.pth

I am getting the following error:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc

Environment:
Torch version : 1.11.0+cu102
CUDA Version: 11.2

Please Help!!

commented

hi @jigsawcoder , sorry for the late reply. The Cuda toolkit version in Torch is 10.2, but your Cuda version is 11.2, you need to upgrade the Cuda toolkit version to 11.2 and try again.

If this error still occurs, feel free to re-open it.