"RuntimeError: Could not infer dtype of numpy.int64" occurs on some models
See original GitHub issueHi there, I encountered RuntimeError: Could not infer dtype of numpy.int64
during running some models provided by this repository. (Some report RuntimeError: Numpy is not available
.)
The command I used is python run.py [MODEL] -d cuda -m eager -t eval/train
. I think I have installed the correct environment (including numpy) and most of the models in the repository work well. So I am wondering what’s going on with these problematic models.
The questioned models are fastNLP_Bert, detectron2_maskrcnn, yolov3(train), Super_SloMo, vision_maskrcnn, etc.
Thanks so much for any feedback.
Issue Analytics
- State:
- Created a year ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Fit failing with RuntimeError: Could not infer dtype of numpy ...
int64. Context: I want to run a classification model on complaints text using fastai.
Read more >RuntimeError: Could not infer dtype of numpy.int64 - nlp
I have a line of code: label_tensor = torch.tensor(self.label [item]).long () when I train on Google colab, it's not wrong, but when I...
Read more >Could not infer dtype of numpy.int64 - Questions
I have my own dataset I created using the introductory tutorial. But when I try to use it in my model, I get...
Read more >RuntimeError: Could not infer dtype of NoneType · Issue #3932
a model fails to reproduce the results in detectron2 model zoo, or proves existence of bugs. Environment: Paste the output of the following ......
Read more >PyTorch: Infer dtype from device capability, not input data
In your case, as numpy has it's default set to np.float64 (regardless of system and architecture) PyTorch will infer it's analogous ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @xuzhao9, I solved this issue by downgrading the pillow@9.2.0 to pillow@8.2.0. For reference to those who encounter the same issue.
Hi @xuzhao9, I was originally using
AppCases/pytorch
but now I am using https://github.com/pytorch/pytorch/commit/6162a043640cf01695cf568edd0be047d56477ff. It still has the same error. I am also using the latest vision and torchtext.