WuJie1010 / Facial-Expression-Recognition.Pytorch

A CNN based pytorch implementation on facial expression recognition (FER2013 and CK+), achieving 73.112% (state-of-the-art) in FER2013 and 94.64% in CK+ dataset
MIT License
1.78k stars 545 forks source link

Volatile was removed #87

Closed farhanucil closed 4 years ago

farhanucil commented 4 years ago

Running mainpro_CK+.py and got this warning:

UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead. inputs, targets = Variable(inputs, volatile=True), Variable(targets)

Its located in mainpro_CK+.py line 141, can you give me suggestion? thanks.

WuJie1010 commented 4 years ago

You may use a higher version of pytorch~ please comment "inputs, targets = Variable(inputs, volatile=True), Variable(targets)", and add "with torch.no_grad():" before eval~