[英]How to use Lazy Adam optimizer in tensorflow 2.0.0
This code doesnt work: it has problem with tf.contrib
此代码不起作用:
tf.contrib
有问题
model.compile(optimizer=TFOptimizer(tf.contrib.opt.LazyAdamOptimizer()), loss='categorical_crossentropy')
I have tried something with tensorflow_addons.optimizers.LazyAdam()
but that does not work either.我已经尝试过
tensorflow_addons.optimizers.LazyAdam()
,但这也不起作用。
Any ideas how to run LazyAdam
in tensorflow 2.0.0?任何想法如何在 tensorflow 2.0.0 中运行
LazyAdam
?
PS: only Adam
works well as following: PS:只有
Adam
在以下方面运作良好:
model.compile(optimizer=tf.keras.optimizers.Adam(), loss='categorical_crossentropy')
import tensorflow_addons as tfa
optimizer = tfa.optimizers.LazyAdam()
tensorflow_addons is an extra functionality for TensorFlow 2.x, but now Tensorflow 2.x is still not very stable, if you are facing with module 'tensorflow_core.keras.utils' has no attribute 'register_keras_serializable'
, try to update you tensorflow to the latest stable version. tensorflow_addons is an extra functionality for TensorFlow 2.x, but now Tensorflow 2.x is still not very stable, if you are facing with
module 'tensorflow_core.keras.utils' has no attribute 'register_keras_serializable'
, try to update you tensorflow to the最新的稳定版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.