Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The error when I try to change the batch_size #3

Open
StephenChen625 opened this issue Mar 22, 2019 · 9 comments
Open

The error when I try to change the batch_size #3

StephenChen625 opened this issue Mar 22, 2019 · 9 comments

Comments

@StephenChen625
Copy link

@whywhs First of all, thank you very much for providing the source code.
The training process was too slow when I run with the default settings(about 20 minutes/epoch).
I tried to add the num_workers, but there's not much improvement.

When I wanted to change the batch_size to 2 or 4, the following error occurred:
2019-03-22 16-38-45屏幕截图

Could you please help me solve the problem?
Thanks a lot.

@whywhs
Copy link
Owner

whywhs commented Mar 22, 2019

Sure, I'm glad to answer your question. I'm sorry for that I didn't add batch_size to this project. So, if you add batch_size, the error will occur.

@StephenChen625
Copy link
Author

Thanks for your answer.
Okay. I'm going to run a weekend under the setting, and see the results.
By the way, how many epochs are needed before convergence?
I have run 14 epochs, but the sacc is still 0.

Here is part of my log info:
epoch is 14, the whole loss is 10.573622
wer is 0.50119
sacc is 0.00000
the best is 0.479045

@whywhs
Copy link
Owner

whywhs commented Mar 22, 2019

yes, I have also noticed this problem. I've been ran about 120 epochs, and the sacc is always 0. I'm also confused and I don't know what's wrong.
Recently, I've been updating my program and try to solve this bug. Meanwhile, I suggest you try to test accuracy with Densenet_testway.py

@StephenChen625
Copy link
Author

Looking forward to the updates.
Ok, I'll try the Densenet_testway.py.
Thanks again.

@StephenChen625
Copy link
Author

Thanks so much for updating your code.
Now I've successfully trained on batch.

Here is some problems when I tried to train:

  1. Error: ModuleNotFoundError: No module named 'Resnet101'
    Solution: Comment the line 16 in Train.py "# from Resnet101 import resnet101"

  2. Error:FileNotFoundError: [Errno 2] No such file or directory: 'densenet121-a639ec97.pth'
    Solution: I downloaded the model by hand through the urls in Densenet_torchvision.py "'https://download.pytorch.org/models/densenet121-a639ec97.pth'".
    I don't know why it didn't download automatically.

By the way, I found a new paper about HMER, which claims to have a very good result. I'm new to deep learning, so I'm unable to realize it. But I hope it can help you with your research.
Paper: Transcribing Content from Structural Images with Spotlight Mechanism
http://staff.ustc.edu.cn/~cheneh/paper_pdf/2018/Yu-Yin-KDD.pdf
图片

@whywhs
Copy link
Owner

whywhs commented May 24, 2019

Hi, Thanks for you to remind me about the BUG from my code.
If you want to download the pretrain Densenet, you can use this https://download.pytorch.org/models/densenet121-a639ec97.pth
Finally, I will read this paper and see what I can do

@StephenChen625
Copy link
Author

Thanks.
I'll follow your updates.

@caozhengquan
Copy link

Hi, Thanks for you to remind me about the BUG from my code.
If you want to download the pretrain Densenet, you can use this https://download.pytorch.org/models/densenet121-a639ec97.pth
Finally, I will read this paper and see what I can do

Could you add the paper you reference to the Readme file please

@whywhs
Copy link
Owner

whywhs commented Sep 18, 2019

You can find additional information from 'version_before.md'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants