Giter VIP home page Giter VIP logo

Comments (6)

HarukiYqM avatar HarukiYqM commented on July 23, 2024 1

At each iteration, the random number is random. You can verify this by run two consecutive randn. Results are different.

If you start the whole program again and use the same seed, the sequence of random number is fixed. That’s how it works.

from non-local-sparse-attention.

HarukiYqM avatar HarukiYqM commented on July 23, 2024

Hi, the is because the path is not setting up correctly. After extracting the benchmark zip file, you should get a folder with name “benchmark”. Please set the —dir_data to a path pointing to the parent folder of benchmark in the demo.sh.

from non-local-sparse-attention.

C-water avatar C-water commented on July 23, 2024

Thank you. In demo.sh, I deleted '--save_result'. If I keep '--save_result', there will still be other bugs.

In addition, in line 23 of attention.py, you use the Torch. Randn function, which generates random numbers every time. Don't random numbers influence the ultimate result? How do you avoid this problem?

from non-local-sparse-attention.

HarukiYqM avatar HarukiYqM commented on July 23, 2024

Hi, it should be bug free even with the —save_results flag. What is your error message?

For the second question, the random seed is fixed in main.py to control the randomness so that results should be identical for multiple runs.

In terms of LSH, the multi-round hashing makes results highly robust.

However, the results can still be very slightly different (+-0.01) according to the pytorch doc: “Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds.”

from non-local-sparse-attention.

C-water avatar C-water commented on July 23, 2024

Hi, I just verified that controlling the random seed 'seed=1' does limit randomness, and the output of torch. randn is the same.
However, will 'seed=1' also be fixed during training? If the output of torch. randn (shape) is the same during the training, isn't the rotation Angle in LSH fixed?

from non-local-sparse-attention.

C-water avatar C-water commented on July 23, 2024

Thank you, and I will try.

from non-local-sparse-attention.

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.