lsvih / Sliding-Convolution

Pytorch implementation of "Scene Text Recognition with Sliding Convolutional Character Models"
MIT License
14 stars 8 forks source link

some errors happen when i try "python3 main.py --cuda=True --mode=test" #3

Closed jjz-learning closed 4 years ago

jjz-learning commented 4 years ago

Have someone meet this problem "RuntimeError: PyTorch was compiled without NumPy support"? when I was executing "python3 --cuda=True --mode=test", the error happened. It's like this:

Loading test data... 0%| Traceback (most recent call last): | 0/188 [00:00<?, ?it/s] File "main.py", line 98, in main() File "main.py", line 28, in main test(model, test_loader) File "main.py", line 74, in test out = model(images) File "/home2/jiangjz/anaconda3/envs/torch0.4.1/lib/python3.7/site-packages/torch/nn/modules/module.py", line 477, in call result = self.forward(*input, **kwargs) File "/home2/jiangjz/projects/Sliding-Convolution-master/model.py", line 69, in forward return self.decode(out) File "/home2/jiangjz/projects/Sliding-Convolution-master/model.py", line 79, in decode pred = pred.permute(1, 0, 2).cpu().data.numpy() # batch, step, class RuntimeError: PyTorch was compiled without NumPy support 0%|

Who can help me? Thank you!

lsvih commented 4 years ago

Please post the version of torch and numpy.

import torch
import numpy
print(torch.__version__)
print(numpy.__version__)
jjz-learning commented 4 years ago

Please post the version of torch and numpy.

import torch
import numpy
print(torch.__version__)
print(numpy.__version__)

Thank you, I do as you taught me to try, but it didn't work. at last, I found an answer along with"https://blog.csdn.net/m0_37644085/article/details/93033883" from the blog, I used two words: pip install numpy==1.15.0 pip install torch==0.4.1.post2 and this solved my problems. Thanks again!

jjz-learning commented 4 years ago

Hello, I have meet some errors when i do the same this. You may find my solutions on the errors in the "issues" conda install numpy conda install torch0.4.1-post I may use these comands. Yan can check it.

---Original--- From: "lsvih"<notifications@github.com> Date: Wed, Nov 27, 2019 16:07 PM To: "lsvih/Sliding-Convolution"<Sliding-Convolution@noreply.github.com>; Cc: "Author"<author@noreply.github.com>;"jjz-learning"<2733962438@qq.com>; Subject: Re: [lsvih/Sliding-Convolution] some errors happen when i try "python3 main.py --cuda=True --mode=test" (#3)

Closed #3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jjz-learning commented 4 years ago

https://blog.csdn.net/m0_37644085/article/details/93033883?from=singlemessage You can see this blog. Besides, I think the epoch should be more than 300times, or the accurate may be very small and even zero. Hope this can solve you problems.

---Original--- From: "lsvih"<notifications@github.com> Date: Wed, Nov 27, 2019 16:07 PM To: "lsvih/Sliding-Convolution"<Sliding-Convolution@noreply.github.com>; Cc: "Author"<author@noreply.github.com>;"jjz-learning"<2733962438@qq.com>; Subject: Re: [lsvih/Sliding-Convolution] some errors happen when i try "python3 main.py --cuda=True --mode=test" (#3)

Closed #3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.