因为:即使对bn设置了 requires_grad = False ,一旦 model.train() ,bn还是会偷偷开启update( model.eval()模式下就又停止update )。(详见【pytorch】bn) 所以:train每个epoch之前都要统一重新定义一下这块,否则容易出问题。...
首先确保已经安装了tnn环境:onnx2tnn转tnn:def onnx2tnn(self): assert os.path.isfile(simplified_onnx_path) os.system('cd {}n' 'python onnx2tnn.py {} ...
An open source machine learning framework that accelerates the path from research prototyping to production deployment.