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

GPU out of memory #77

Open
hasan-ghavidel opened this issue Jun 4, 2024 · 0 comments
Open

GPU out of memory #77

hasan-ghavidel opened this issue Jun 4, 2024 · 0 comments

Comments

@hasan-ghavidel
Copy link

i received this error:

/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/functional.py:512: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3587.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Best model: TransMorph_Validation_dsc0.744.pth.tar
Traceback (most recent call last):
File "/scratch/h/H.Ghavidel/TransMorph_Transformer_for_Medical_Image_Registration/IXI/TransMorph/infer_TransMorph.py", line 120, in
main()
File "/scratch/h/H.Ghavidel/TransMorph_Transformer_for_Medical_Image_Registration/IXI/TransMorph/infer_TransMorph.py", line 68, in main
x_def, flow = model(x_in)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "/scratch/h/H.Ghavidel/TransMorph_Transformer_for_Medical_Image_Registration/IXI/TransMorph/models/TransMorph.py", line 859, in forward
f5 = self.c2(x_s0)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/container.py", line 217, in forward
input = module(input)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/conv.py", line 610, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/h/H.Ghavidel/venv/my_venv/lib64/python3.9/site-packages/torch/nn/modules/conv.py", line 605, in _conv_forward
return F.conv3d(
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 420.00 MiB. GPU

may anyone helps me to fix it

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