model.train() :启用 BatchNormalization 和 Dropout
model.eval() :不启用 BatchNormalization 和 Dropout
参考:
https://pytorch.org/docs/stable/nn.html?highlight=module%20eval#torch.nn.Module.eval
原文地址:https://www.cnblogs.com/sbj123456789/p/10825685.html
时间: 2024-10-14 14:59:53