I have already trained a lstm model with epoch 30~.
But when I add a CRF decode layer, it has a error with out-of-memory in epoch 6 or 7.
I think it’s true. The model has many parameters, so I want to release some no-used parameters.
what should I do? I don’t know which parameters is in the memory.
All tensor.to(‘cuda’) ? or clone() ?
Has pytorch the auto function to release the tensor?
Thanks a lot