facebookresearch / esm

Evolutionary Scale Modeling (esm): Pretrained language models for proteins
MIT License
3.16k stars 627 forks source link

RuntimeError: view size is not compatible with input tensor's on MPS backend #421

Closed shaharec closed 1 year ago

shaharec commented 1 year ago

When running the pretrained esm2_t30_150M_UR50D module on torch mps backend getting a RuntimError.

results = model(batch_tokens, repr_layers=[30], return_contacts=True) On torch.backends.mps backend

RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

Screenshot 2022-12-07 at 15 01 21

shaharec commented 1 year ago

This issue is fixed in the latest PyTorch