是否可以在 Keras 的训练和测试阶段使用 dropout?
就像这里描述的那样:https://github.com/soumith/ganhacks#17-use-dropouts-in-g-in-both-train-and-test-phase https://github.com/soumith/ganhacks#17-use-dropouts-in-g-in-both-train-and-test-phase
当然可以,你可以设置training
论证True
when calling the Dropout
层。这样,dropout就会应用于训练和测试阶段:
drp_output = Dropout(rate)(inputs, training=True) # dropout would be active in train and test phases
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)