Jingshu
Jingshu
I'm having the same problem here did you find the solution ?
同问,如果有些模型是通过规则构建的,可以在哪里添加吗
> 可能是inference的时候,dropout参数没有重置为0 e = Embedder(path) 在创建的时候已经 设置了 eval()模式, 我看了所有子模型的dropout也的确都是0
> @Liujish931 我看了一下具体代码,只有frontend.py里面的定义的model设置了eval()模式。但是真正做inference的model, `.modules.elmo.ElmobiLm` 没有设置eval()模式。所以应该还是在inference的时候做了dropout 创建模型的get_model() 里面最后有model.eval(), modules.elmo.ElmobiLm只是整个模型的子模型 所以也会被设置为0 而且你可以运行的时候看 的确所有的dropout都是0 没错 eval() 会影响所有子模型的dropout和 batch normalisation, pytorch doc里有