GithubHelp home page GithubHelp logo

Number of epochs about crnn-pytorch HOT 8 CLOSED

holmeyoung avatar holmeyoung commented on June 19, 2024
Number of epochs

from crnn-pytorch.

Comments (8)

Holmeyoung avatar Holmeyoung commented on June 19, 2024 2

Hi, there are two questions.

  1. Number of epoch.

    As we konw, with the training process going, the training loss will reduce all the time. But it's not always a good thing. Because there is a balance between train and test.

    At first, we call it as under-fitting , it means that we have not learned the full feature from the train sample and of course, the test accuracy is not very well.

    The second stage is the balance point between train and test. The training loss is not the lowest and the train accuracy is not the highest, but the model already has generalization.

    After that, yes, our training loss still reduce, but it is overfitting , which means perform well on train sample but bad on test sample, just like what you have said

    when the number of epochs increases it deviates from the right result and makes wrong guesses

    I find a picture from the wikipedia which shows what is overfitting.

    1024px-Overfitting svg

    The black line is the proper one , while the green one is overfitting

  2. About noisy image.

    • If you want to predict on noisy image, then you must train on noisy image.
    • More data can make the model learn all the case and know how to deal with different noisy image.
    • If you use enough noisy data and the model perform well on train sample but perform bad on test, it is overfitting. Use lower epoch and try again.

And...em...how do you like the name holmeyoung , i don't know how to naming an English name. So i don't konw if it is a right name 😕

from crnn-pytorch.

mariembenslama avatar mariembenslama commented on June 19, 2024 2

I see, change the display interval to 10 and valInterval to 100. Check out issue #3 "cuda gpu" for more explanation by Holmeyoung.

Also try my suggestion about generating text with fixed length. But don't worry because it's able to recognize variable lengths later on after the train. Since we work on RNNs it's able to recognize anything with variable lengths.

Just try fixed in the train phase.

from crnn-pytorch.

niddal-imam avatar niddal-imam commented on June 19, 2024 1

Hi Mariem,

I just have a question as you was able to train your model successfully. Does the test loss starts small and then get bigger and reduced again. The number of epoch is 180 now, and the accuracy doesn't change 0.0000. Actually, I am having hard time training the model.

from crnn-pytorch.

mariembenslama avatar mariembenslama commented on June 19, 2024 1

Hello, that did happen to me when the text length (text inside the images of the dataset) was variable. The accuracy increased and the loss decreased when I cha'ged it to a fixed length. Holmeyoung said that it has nothing to do with the length, but just try it haha 😅 It may work for you.

However, this is just a suggestion, can you tell me the steps you followed?

from crnn-pytorch.

niddal-imam avatar niddal-imam commented on June 19, 2024 1

Thank you very much. I will make the changes, and hopefully it will work fine.
Your help is highly appreciated.

from crnn-pytorch.

mariembenslama avatar mariembenslama commented on June 19, 2024

Thank you very much for the answer! So I need to add more varient data. Understood!

Also I think your name is very cute! But I don't know the meaning precisely in Chinese so I can't answer. However in English I guess Holmeyoung = Young Holmes = the young/small detective (The movie) and which I find cute ❤️

from crnn-pytorch.

niddal-imam avatar niddal-imam commented on June 19, 2024

Thank you for your suggestions. I generates 20,000 images with text of different length. Then, I created txt file contains images paths and labels. Then, I converted the files to train.lmdb and val.lmdb. Finally, I train the model without making any changes in params.py file, but the accuracy doesn't printed out. So I change the valInterval to 300, and the accuracy start to show. However, the accuracy is 0.0000 most of the times. Now, the number of epoch is 240, and the accuracy still 0.0000 :(

from crnn-pytorch.

niddal-imam avatar niddal-imam commented on June 19, 2024

Now the number of epoch is 310, and the accuracy just changed from 0.00000 to 0.000977.

from crnn-pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.