Giter Site home page Giter Site logo

您好,请问随机种子固定后,复现后每次结果都不相同是什么原因?怎么才能在随机种子相同时固定复现结果? about docunet HOT 3 CLOSED

zjunlp avatar zjunlp commented on July 21, 2024
您好,请问随机种子固定后,复现后每次结果都不相同是什么原因?怎么才能在随机种子相同时固定复现结果?

from docunet.

Comments (3)

njcx-ai avatar njcx-ai commented on July 21, 2024

您好,很抱歉代码中随机种子固定的策略可能有遗漏。
如果种子设置没问题的话,结果还是不一样可能是torch.backends.cudnn.benchmark的问题。这是python调用cudnn来加速卷积的一个机制。解决方法是将torch.backends.cudnn.benchmark = False,然后直接加一句torch.backends.cudnn.deterministic = True。

from docunet.

yxy0102 avatar yxy0102 commented on July 21, 2024

作者你好,我也遇到了这个问题,并且我在set_seed里加入了您说的那两行代码,但是每次的结果还是在变化,还有什么解决办法吗
0be97e2d9d2742328ca6456771a6854

from docunet.

zxlzr avatar zxlzr commented on July 21, 2024

您好,我建议您检查下是否还有部分参数的种子没有fix,我也不是很清楚您这种情况非常抱歉。

from docunet.

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.