Sorry, I managed to get rid of the error, but now I get memory errors in the middle of training:
RuntimeError: CUDA out of memory. Tried to allocate 250.00 MiB (GPU 0; 10.92 GiB total capacity; 9.19 GiB already allocated; 45.31 MiB free; 10.10 GiB reserved in total by PyTorch)
Memory is constant throughout training, so this shouldn’t happen. However, I do create new sequentials in the middle of training and replace old ones, as in list_of_sequentials[index] = new_sequential
No matter how much I reduce memory requirements, I get this memory leak