Giter Site home page Giter Site logo

antiberty's People

Contributors

jeffreyruffolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

antiberty's Issues

Calculating pseudo likelihoods on GPU

Hi!

I wanted to calculate pseudo likelihoods for my amino acid sequences using antiberty. I run into the following error when trying to use the pseudo_log_likelihood function:

_nll = torch.nn.functional.cross_entropy(
File "C:\Users\anama\miniconda3\envs\plm\lib\site-packages\torch\nn\functional.py", line 3053, in cross_entropy
return torch._C._nn.cross_entropy_loss(input, target, weight, Reduction.get_enum(reduction), ignore_index, label_smoothing)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! (when checking argument for argument target in method wrapper_CUDA__nll_loss2d_forward)

Looking at your code briefly, I believe it is because the labels stay on the cpu while the logits are on cuda when calculating nll. I have cuda on my laptop so I checked and confirmed that my antiberty instance is by default located on my GPU. Could you please look into this or let me know if I am missing something? Thanks a lot!

Sequence padding issue.

I have multiple sequences with different length. And in order to output a matrix with the same dimension (202,512), I want to padding each sequence to 200 length first. So, what is the appropriate symbol for this problem?" _" or "0" or " ". Thanks ๏ผ

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.