torch.nn.Module.eval

torch.nn.Module.eval:

Sets the module in evaluation mode.

This has any effect only on certain modules. See documentations of particular modules for details of their behaviors in training/evaluation mode, if they are affected,

这个函数仅对特定的模块有效.有些函数在 training/evaluation  模态下有不同的行为,可以到具体模块的文档去查看在不同模态下有什么不同的行为.

备注:

受"训练模态""评估模态"影响的模块有 "dropout层"及"batch normalization层".其它的暂不知道

 

猜你喜欢

转载自blog.csdn.net/Strive_For_Future/article/details/83240553