weights_regularizer = tf.contrib.layers.l2_regularizer(cfg.FLAGS.weight_decay)
AttributeError: module 'tensorflow.compat.v1' has no attribute 'contrib'
l2_regularizer改怎么用,请尽量给出代码
weights_regularizer = tf.contrib.layers.l2_regularizer(cfg.FLAGS.weight_decay)
AttributeError: module 'tensorflow.compat.v1' has no attribute 'contrib'
l2_regularizer改怎么用,请尽量给出代码
tensorflow2.0将1.0的很多功能优化或去掉了,建议降低tensorflow版本