Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #34

Open
dcbiton opened this issue Sep 2, 2024 · 0 comments

Comments

@dcbiton
Copy link

dcbiton commented Sep 2, 2024

2024-09-02 15:42:54,465 [] [INFO] Loading the model
2024-09-02 15:42:55,222 [] [INFO] Model has been loaded
  0%|                                                                         | 0/10 [00:00<?, ?it/s]INPZ torch.Size([1, 488, 488, 128])
MASK torch.Size([1, 488, 488])
  0%|                                                                         | 0/10 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/predict.py", line 183, in <module>
    main()
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/predict.py", line 129, in main
    prots, outputs = model.inference(batch, as_protein=False, noisy_first=args.noisy_first,
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/alphaflow/model/wrapper.py", line 363, in inference
    output = self.model(batch)
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/alphaflow/model/alphafold.py", line 223, in forward
    inp_z = self._get_input_pair_embeddings(
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/alphaflow/model/alphafold.py", line 130, in _get_input_pair_embeddings
    inp_z = self.input_pair_stack(inp_z, mask, chunk_size=None)
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/alphaflow/model/input_stack.py", line 276, in forward
    t, = checkpoint_blocks(
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/openfold/utils/checkpointing.py", line 85, in checkpoint_blocks
    return exec(blocks, args)
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/openfold/utils/checkpointing.py", line 72, in exec
    a = wrap(block(*a))
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/Users/dionessa/Documents/cryptochrome_codes/alphaflow/alphaflow/model/input_stack.py", line 122, in forward
    self.tri_att_end(
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/openfold/model/triangular_attention.py", line 114, in forward
    x = self.layer_norm(x)
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/openfold/model/primitives.py", line 211, in forward
    out = nn.functional.layer_norm(
  File "/opt/anaconda3/envs/alphaflow/lib/python3.9/site-packages/torch/nn/functional.py", line 2503, in layer_norm
    return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant