Comments (3)
@mariembenslama Hi,
-
Check your data.
What is the number of you train sample? In my case, i used
5*10^6
sample to train1000
characters. To get satisfying result, we need enough clean data. -
Check your params.
Some suggestions,
-
stage1
nepoch = 1000 batchSize = 64 lr = 0.001 displayInterval = 100 valInterval = 1000 saveInterval = 1000
Set
lr = 0.001
, we need a bigger lr to avoid getting local optimal solution at first.Set
batchSize = 64
, small batchsize(eg: 2) will slow down the convergence speed and make it difficult to find the proper direction of gradient drop.Set
nepoch = 1000
, this setting should be connected withdisplayInterval, valInterval, saveInterval
. Print the val accuracy aftervalInterval
and save model aftersaveInterval
, when the accuracy get up and down, kill the training process manually, intostage2
-
stage2
lr = 0.0001 pretrained = 'path/to/your/model'
Yes, just set
lr = 0.0001
to make the result more stable. Load the model fromstage1
to prevent training from zero. -
about stage1, 2
nepoch
can be big enough, because you can kill the process manually after saving the good performance model. So setsaveInterval
to a proper number, too small will waste the disk, while too big will miss the model. It should be the same withvalInterval
, after getting theaccuracy
, then save the model.
-
-
Check your loss and accuracy.
Some suggestions
loss
value is more important thanaccuracy
!If your training loss become smaller and smaller, it's OK. If the
loss
become smaller and smaller but theaccuracy
become up and down, you can turn touse a smaller lr
andload the trained model
to continue training.If your training loss doesn't converge, enmmm,
- too little data
- mistake with data
- some metaphysical problem
SORRY to reply now, we are in different time zone.
Hope this can help you.
from crnn-pytorch.
@mariembenslama have you solved the accuracy problem?
from crnn-pytorch.
I'm still following your proposed solution so I'm creating a dataset with 50^6 * 4 images with variable text length < 26 right now so it's going to take sometime for that.
I'm using google colaboratory.
However I agree your solution will give a good accuracy as to follow it :)
Thank you very much for the help 😀😀😀
from crnn-pytorch.
Related Issues (20)
- KeyError : ' ' HOT 1
- Problem loading checkpointed model
- inference accuracy HOT 10
- Output indicates "PAD" char for all columns HOT 3
- Train problem HOT 1
- A question about pre-trained model HOT 3
- Problem about ctc_loss variable input_length while training HOT 1
- Mean vals and norm vals
- No predictions when training or testing the net !!!
- create image Tensor HOT 2
- Traanning Question HOT 3
- number images train
- Training Problems HOT 2
- 梯度爆炸,loss显示持续显示为inf HOT 1
- img.sub_(0.5).div_(0.5)
- 运行demo用cenn.pth预训练模型显示Expected 512, got 64
- val loss:nan, accuray:0 HOT 1
- [Friendly reminder] About the accuracy of demo.py
- val gpu slow HOT 1
- size mismatch for rnn.1.embedding.weight
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crnn-pytorch.