Hi again.
I tried increasing the value 20 (this is my lstm_size in my VAE model) to a higher number and it causes very high usage of memory in the calculation.
Below is the code to reproduce the high memory consumption
A = torch.rand(11000,11000)

H = torch.rand(11000,200)

C = (A.unsqueeze(1) * H.unsqueeze(2)).sum(dim=2)

The above code is an example of how the code is written in my model, which causes the session to crash.
When the model is ran i get the following error message, with the error referring to the calculation of C.
CUDA out of memory. Tried to allocate 180.30 GiB (GPU 0; 15.90 GiB total capacity; 6.81 GiB already allocated; 8.10 GiB free; 7.10 GiB reserved in total by PyTorch)
Is there a way to optimize the calculation of C?
Thanks in advance.
Regards Jonas