Giter Site home page Giter Site logo

Comments (11)

Bartzi avatar Bartzi commented on June 29, 2024

What do you mean with it stops? Is the accuracy not increasing anymore? Is the script crashing? ...?

from crnn-lid.

Arafat4341 avatar Arafat4341 commented on June 29, 2024

@Bartzi Yeah The validation accuracy is not increasing for last 9 epochs.

from crnn-lid.

Bartzi avatar Bartzi commented on June 29, 2024

Well, in order to help. I would need more information. What are you training on? Your own data? What is the current validation accuracy? Did you change anything in the code? What is your train configuration?

from crnn-lid.

Arafat4341 avatar Arafat4341 commented on June 29, 2024

Yes I am training on my own Data. Dataset contains English and Japanese audios.
Current validation accuracy 0.84.

Training configuration:

batch_size: 64
learning_rate: 0.001
num_epochs: 50

data_loader: "ImageLoader"
color_mode: "L"  # L = bw or RGB
input_shape: [129, 500, 1]

model: "topcoder_crnn_finetune" # _finetune"

segment_length: 10  # number of seconds each spectogram represents
pixel_per_second: 50

label_names: ["EN", "JP"]
num_classes: 2

from crnn-lid.

Bartzi avatar Bartzi commented on June 29, 2024

It could be that your model converges, or that your learning rate is too high at this point. You could add a callback that scales the learning rate of the Adam optimizer, maybe that helps.

from crnn-lid.

Arafat4341 avatar Arafat4341 commented on June 29, 2024

@Bartzi Thanks a lot for your suggestion! Would you kindly tell me how can I modify callback object in training script to scale the learning rate?!

from crnn-lid.

Bartzi avatar Bartzi commented on June 29, 2024

The best tip is to have a look at the documentation of Keras 😉
This page, for instance, could be helpful: https://faroit.com/keras-docs/1.2.2/callbacks/

from crnn-lid.

Arafat4341 avatar Arafat4341 commented on June 29, 2024

@Bartzi Thanks a lot!

I found : ReduceLROnPlateau.
We can add this to update the learning rate if the accuracy doesn't improve after certain epochs.
Currently the learning rate we are using is 0.001.
Can you suggest me the lower bound for lr ?
Actually I cannot guess how less will be too less!

from crnn-lid.

Bartzi avatar Bartzi commented on June 29, 2024

As with most things in Deep Learning: You have to try. But my first idea would be to set it to 0.0001 and see what happens. Going any lower than 1e-6 as starting learning rate is not a good idea, so that would be too low.

from crnn-lid.

Arafat4341 avatar Arafat4341 commented on June 29, 2024

@Bartzi Thanks a lot.
The model still converges. Stops at epoch 23. No improvement of validation accuracy for last 20 epochs.

early_stopping_callback = EarlyStopping(monitor='val_loss', min_delta=0, patience=15, verbose=1, mode="min")
reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.2, patience=5, min_lr=0.0001)

I collected the data from youtube. The problem is My dataset is not so big. Only 3328 mel-spec images for training set.
Problem occurred while downloading data. Youtube_dl sent too many requests error. So I couldn't download as much data as I wanted.
Can it be a problem with my data? Am I trying to train on really poor data?!

from crnn-lid.

Bartzi avatar Bartzi commented on June 29, 2024

Yes, that low amount of training data might very well be a problem.
Maybe you can try to gather more data, I think this should help with your results.

from crnn-lid.

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.