Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OutOfMemoryError Traceback (most recent call last)
- <ipython-input-4-aa3f31ef5eca> in <cell line: 10>()
- 22 # Training the discriminator
- 23 discriminator.zero_grad()
- ---> 24 output_discriminator = discriminator(all_samples.to(device=device))
- 25 loss_discriminator = loss_function(output_discriminator, all_samples_labels.to(device=device))
- 26
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _wrapped_call_impl(self, *args, **kwargs)
- 1551 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
- 1552 else:
- -> 1553 return self._call_impl(*args, **kwargs)
- 1554
- 1555 def _call_impl(self, *args, **kwargs):
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _call_impl(self, *args, **kwargs)
- 1560 or _global_backward_pre_hooks or _global_backward_hooks
- 1561 or _global_forward_hooks or _global_forward_pre_hooks):
- -> 1562 return forward_call(*args, **kwargs)
- 1563
- 1564 try:
- <ipython-input-2-abdec4b3329d> in forward(self, x)
- 57
- 58 def forward(self, x):
- ---> 59 return self.model(x)
- 60
- 61 discriminator = Discriminator().to(device=device)
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _wrapped_call_impl(self, *args, **kwargs)
- 1551 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
- 1552 else:
- -> 1553 return self._call_impl(*args, **kwargs)
- 1554
- 1555 def _call_impl(self, *args, **kwargs):
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _call_impl(self, *args, **kwargs)
- 1560 or _global_backward_pre_hooks or _global_backward_hooks
- 1561 or _global_forward_hooks or _global_forward_pre_hooks):
- -> 1562 return forward_call(*args, **kwargs)
- 1563
- 1564 try:
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/container.py in forward(self, input)
- 217 def forward(self, input):
- 218 for module in self:
- --> 219 input = module(input)
- 220 return input
- 221
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _wrapped_call_impl(self, *args, **kwargs)
- 1551 return self._compiled_call_impl(*args, **kwargs) # type: ignore[misc]
- 1552 else:
- -> 1553 return self._call_impl(*args, **kwargs)
- 1554
- 1555 def _call_impl(self, *args, **kwargs):
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py in _call_impl(self, *args, **kwargs)
- 1560 or _global_backward_pre_hooks or _global_backward_hooks
- 1561 or _global_forward_hooks or _global_forward_pre_hooks):
- -> 1562 return forward_call(*args, **kwargs)
- 1563
- 1564 try:
- /usr/local/lib/python3.10/dist-packages/torch/nn/modules/activation.py in forward(self, input)
- 102
- 103 def forward(self, input: Tensor) -> Tensor:
- --> 104 return F.relu(input, inplace=self.inplace)
- 105
- 106 def extra_repr(self) -> str:
- /usr/local/lib/python3.10/dist-packages/torch/nn/functional.py in relu(input, inplace)
- 1498 result = torch.relu_(input)
- 1499 else:
- -> 1500 result = torch.relu(input)
- 1501 return result
- 1502
- OutOfMemoryError: CUDA out of memory. Tried to allocate 4.00 GiB. GPU 0 has a total capacity of 14.74 GiB of which 1.71 GiB is free. Process 7476 has 13.03 GiB memory in use. Of the allocated memory 12.32 GiB is allocated by PyTorch, and 595.48 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)
Advertisement
Add Comment
Please, Sign In to add comment