tf.keras.layers.Dense 在 reuse 时有坑

with tf.variable_scope("", reuse=tf.AUTO_REUSE):
    model_train = MyModel(
        is_training=True)
with tf.variable_scope("", reuse=True):
    model_dev = MyModel(
        is_training=False)
model_train.train(data_train, data_dev, model_dev)

MyModel里有tf.keras.layers.Dense,发现该tensor是 resource variable
结果在dev eval的时候不行

你可能感兴趣的:(TensorFlow)