AttributeError: module 'tensorflow_core.compat.v1' has no attribute 'contrib'
将
initializer = tf.contrib.layers.xavier_initializer(seed = 1)
替换为:
initializer = tf.truncated_normal_initializer(stddev=0.1)
将
initializer = tf.contrib.layers.xavier_initializer(seed = 1)
替换为:
initializer = tf.truncated_normal_initializer(stddev=0.1)