Exscientia / abodybuilder3

Apache License 2.0
40 stars 11 forks source link

device issue #5

Closed QUEST2179 closed 3 months ago

QUEST2179 commented 4 months ago

following the examples given in notebooks/example.ipynb

output = model(ab_input_batch, ab_input_batch["aatype"])

File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "/home/structure/abodybuilder3-main/src/abodybuilder3/openfold/model/structure_module.py", line 721, in forward z_initial = self.linear_in_edge(z_initial) File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, **kwargs) File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/torch/nn/modules/linear.py", line 114, in forward return F.linear(input, self.weight, self.bias) RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument mat2 in method wrapper_mm)

henrykenlay commented 4 months ago

Hi @QUEST2179, does this merged PR fix your issue https://github.com/Exscientia/abodybuilder3/pull/7 ?

QUEST2179 commented 4 months ago

Great, it fixed, thanks for helping.