Git Product home page Git Product logo

Comments (4)

mingfeima avatar mingfeima commented on July 21, 2024

@zhuhaozhe please help fix this one !

from pytorch.

albanD avatar albanD commented on July 21, 2024

This sounds like expected behavior. Please see https://pytorch.org/docs/stable/notes/numerical_accuracy.html#batched-computations-or-slice-computations for details on this behavior.
Do re-open the issue if you think this doesn't match what is described there.

from pytorch.

jianlingl avatar jianlingl commented on July 21, 2024

This sounds like expected behavior. Please see https://pytorch.org/docs/stable/notes/numerical_accuracy.html#batched-computations-or-slice-computations for details on this behavior. Do re-open the issue if you think this doesn't match what is described there.

Thank you for reply. The issue might not be due to the mentioned link, and the situation is more serious than expected.

  1. The batch calculation values have issues in the second linear layer but are accurate in the first one.
  2. I verified that x1_fc2 and x2_fc2 are exactly the same on the GPU, but there are differences on the CPU. This causes the model to perform differently on different devices.
  3. The numerical differences are actually quite large. For example,
x1_fc2[0, 5].item(), x2_fc2[0, 5].item()
(0.027112668380141258, 0.02711271122097969)

from pytorch.

jianlingl avatar jianlingl commented on July 21, 2024

I can not find the button to re-open this issue.

from 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.