Code Monkey home page Code Monkey logo

Comments (3)

uakarsh avatar uakarsh commented on July 20, 2024

Maybe, I think, this line is responsible for the issue:

self.scale = torch.sqrt(torch.FloatTensor([embed_dim]))

And, which the below lines are having problem of .to(device), especially when the device is cuda. Would shortly modify it and let you know, if the problem still persists. If possible, can you do try to change the above line from:
self.scale = torch.sqrt(torch.FloatTensor([embed_dim])) to self.scale = embed_dim**0.5, and remove all the .to(device) parts in the below set of lines and let us know?

I would try from my end as well and would let you know. Thanks for pointing this issue out.

Maybe, this couldn't be the case, and there could be something else, but I would let you know soon. And, can you do let us know, the whole part of the code, since the above mentioned line of code, won't help me recreate the bug

from docformer.

uakarsh avatar uakarsh commented on July 20, 2024

Can you do let me know, if the issue has been resolved or not? If not resolved, can you help me with reproducing the error on Google Colab, since then I can definitely try to solve th bug, and update the same in this repo

Regards,
Akarsh

from docformer.

uakarsh avatar uakarsh commented on July 20, 2024

Hi @kmr2017, sorry for the late reply, but I faced this issue just now, and I think I have managed to solve it. You can just clone: https://github.com/uakarsh/docformer, and this would do the thing (as far as I know). And, do let me know if that solves the issue or not. I would shortly include the update in the main branch as well.

Regards,

from docformer.

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.