简体   繁体   中英

Eval mode for Tensorflow Eager

I Pytorch there is this concept of eval() mode which, when set, affect some layers of the model such as deactivating dropout.

I'm using Tensorflow 1.9 with eager/ tf.data.Dataset /Keras model subclassing and I was wondering if there is an equivalent for it as I don't want to dropout/batchnorm during the validation or test phase.

Thank you.

如果您使用的是Keras,则存在学习阶段的类似概念,如果通过set_learning_phase设置为1(即“测试”),则禁用某些层,例如辍学。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM