AttributeError: 'DBNet' object has no attribute 'load_state_dict' #1213
Replies: 9 comments 7 replies
-
See #940 (same way for detection model) If you use tensorflow you need to use |
Beta Was this translation helpful? Give feedback.
-
Hi i have tried #940 but still getting same error
|
Beta Was this translation helpful? Give feedback.
-
Yes i have pytorch in requirements.txt also tried running with docker get this error
|
Beta Was this translation helpful? Give feedback.
-
I have tried this code but still getting same error
Code
|
Beta Was this translation helpful? Give feedback.
-
Yes i have install pytorch version of doctr
Error getting after running it
|
Beta Was this translation helpful? Give feedback.
-
Requirements.txt
|
Beta Was this translation helpful? Give feedback.
-
Hi @felixdittrich92 any idea ? |
Beta Was this translation helpful? Give feedback.
-
Hi, I found a bug when I'm running it as the python script is working fine. But when I add this code in Fastapi it gives me RUNTIME ERROR |
Beta Was this translation helpful? Give feedback.
-
@felixdittrich92 @felixT2K Environment Info
|
Beta Was this translation helpful? Give feedback.
-
Unable to load a pytorch train model in doctr package getting an error
model = ocr_predictor(det_arch='db_resnet50', reco_arch='sar_resnet31',pretrained=True) model.det_predictor.model.load_state_dict(det_model_path) model.det_predictor.model.postprocessor.unclip_ratio = 2 model.reco_predictor.model.load_weights(rec_model_path)
Beta Was this translation helpful? Give feedback.
All reactions