Giter Site home page Giter Site logo

Comments (1)

foxik avatar foxik commented on July 19, 2024

Hi,

what you are seeing is really just a difference between OSes/CPUs; when I run your ReCodEx solution on my laptop (and also on the ReCodEx machine), I get exactly the results from the Examples, i.e.,

$ python3 sequence_classification.py --rnn=LSTM --epochs=5 --hidden_layer=50
Epoch 1/5
625/625 [==============================] - 8s 10ms/step - loss: 0.6829 - accuracy: 0.5160 - val_loss: 0.6601 - val_accuracy: 0.5166
Epoch 2/5
625/625 [==============================] - 5s 8ms/step - loss: 0.6447 - accuracy: 0.5398 - val_loss: 0.6310 - val_accuracy: 0.5274
Epoch 3/5
625/625 [==============================] - 5s 8ms/step - loss: 0.6226 - accuracy: 0.5545 - val_loss: 0.6108 - val_accuracy: 0.5522
Epoch 4/5
625/625 [==============================] - 5s 8ms/step - loss: 0.5895 - accuracy: 0.5859 - val_loss: 0.5529 - val_accuracy: 0.6215
Epoch 5/5
625/625 [==============================] - 5s 8ms/step - loss: 0.4641 - accuracy: 0.7130 - val_loss: 0.3106 - val_accuracy: 0.8517

The gradients are exploding during the training (because the example with gradient clipping is training faster), so even a very small difference in loss computation can cascade into a large difference in accuracy.

Yes, I swapped the order, mostly because of ReCodEx -- you see all the tests/examples always expanded there, so I placed the tests first (and numbered them) to make it easier to find the inputs corresponding to ReCodEx tests.

from npfl114.

Related Issues (9)

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.