Coder Social home page Coder Social logo

Comments (12)

yuchenlin avatar yuchenlin commented on July 17, 2024

OIC.. the random effect seems to be due to the Dropout.

from sequence_tagging.

guillaumegenthial avatar guillaumegenthial commented on July 17, 2024

You're right, there is no shuffling anywhere. Randomness surely comes from dropout + initialization. However, if you carefully control the random seeds, you should get non-random convergence!

from sequence_tagging.

yuchenlin avatar yuchenlin commented on July 17, 2024

Thanks so much. Although simply setting the random state does not work, I found a page here regarding the exactly the same question.
I will have a try!

from sequence_tagging.

SeekPoint avatar SeekPoint commented on July 17, 2024

maybe you should also set python's random seed fixed

from sequence_tagging.

yuchenlin avatar yuchenlin commented on July 17, 2024

It seems that even if I set dropout=1, the results are still changing.

from sequence_tagging.

yuchenlin avatar yuchenlin commented on July 17, 2024

@lovejasmine i have tried but not effective...: (

from sequence_tagging.

yuchenlin avatar yuchenlin commented on July 17, 2024

I tried use different tf random seed and I found that the results are very different than before.
Thus, it seems that setting random seed is effective to some extent but cannot keep the results 100% exactly the same. I guess it maybe due to the multi-thred thing.

It seems that the tensorflow is often complained by users about the random state stuff..

from sequence_tagging.

guillaumegenthial avatar guillaumegenthial commented on July 17, 2024

Have you tried running it on CPU on a subset of the dataset with a batch of size 1 with dropout = 1? I'm not too familiar with tf random seeds, and the stackoverflow post you refered above seems to mention some pretty weird behavior. Batch size = 1 could alleviate the problem they're mentioning.

from sequence_tagging.

grafael avatar grafael commented on July 17, 2024

@yuchenlin maybe this help: https://stackoverflow.com/questions/38469632/tensorflow-non-repeatable-results

from sequence_tagging.

guillaumegenthial avatar guillaumegenthial commented on July 17, 2024

@yuchenlin did you make progress on this issue? Should we keep it open or should we close it?

from sequence_tagging.

yuchenlin avatar yuchenlin commented on July 17, 2024

@guillaumegenthial sorry for the delayed reply! I was busy doing other stuff. Yes, I guess we can close it. It seems that the current methods are difficult to maintain the stable results under the GPU settings. Thanks!

from sequence_tagging.

guillaumegenthial avatar guillaumegenthial commented on July 17, 2024

@yuchenlin no problem! I'll close it, but I must confess that this is an interesting issue and I'd love to hear more about it if you find the answer one day.

from sequence_tagging.

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.