pranoyr / cnn-lstm

CNN LSTM architecture implemented in Pytorch for Video Classification
MIT License
260 stars 46 forks source link

About ”with torch.no_grad()“ #6

Closed AbnerAI closed 3 years ago

AbnerAI commented 3 years ago

Hi, I saw the line with torch.no_grad() in the cnnlstm.py file, this means that the weight of resnet will not be affected by backward. If I delete with torch.no_grad(), the backward will update the weights of cnn and lstm at the same time?

pranoyr commented 3 years ago

Yes