Code Monkey home page Code Monkey logo

Comments (4)

mingfeima avatar mingfeima commented on July 20, 2024

Hi, thx! @mdushkoff is this only observed on intel/torch or it also exists on original torch?
We did rewrite torch.rand() for better performance, however the guy who wrote this @MlWoo is in hospital now. Will get back to this issue when he finished his therapy.

from torch.

mdushkoff avatar mdushkoff commented on July 20, 2024

@mingfeima I'm so sorry to hear @MlWoo is in the hospital, I hope that they have a swift recovery!

Yes this is only observed in the intel/torch build, and not the original torch build as far as I can tell. I don't think it has much to do with the torch.rand() function as it has been corrupting data that has been loaded in with torch.load(...) and other structured data.

from torch.

MlWoo avatar MlWoo commented on July 20, 2024

@mdushkoff I have looked into the code and identified the problem. After removing the bug, the result seems OK, here is my test:

th> x = torch.rand(2000,20000)+3
                                                                      [0.4202s]
th> ind = torch.randperm(x:size(2))[{{1,10}}]:long()
                                                                      [0.0012s]
th> sx = x:index(2,ind)
                                                                      [0.0461s]
th> print("Slice Range: " .. sx:min() .. "," .. sx:max())
Slice Range: 3.000022164546,3.9997919152956
                                                                      [0.0001s]

Thanks for your reporting the bug.

from torch.

mdushkoff avatar mdushkoff commented on July 20, 2024

Thank you so much, I really appreciate it! Looks like this fixed it!

from torch.

Related Issues (7)

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.