RuntimeError:one of the variables needed for gradient computation has been modified by an inplace operation
原因:0.4.0把Varible和Tensor融合为一个Tensor,inplace操作,之前对Varible能用,但现在对Tensor,就会出错了,所以找到模型中所有的inplace操作,换成非inplace的写法就行
参考:https://blog.csdn.net/DuinoDu/article/details/80435127