我有一个类似于[this] [1]
的模型[1]:https://github.com/Kulbear/deep-learning-coursera/blob/master/Convolutional%20Neural%20Networks/Convolution%20model%20-%20Application%20-%20v1.ipynb在使用1.14版本的情况下提供不同的结果,在使用1.2.1版本的情况下提供另一结果。 1.14的输出有警告,例如:
WARNING:tensorflow:Entity <bound method Flatten.call of <tensorflow.python.layers.core.Flatten object at 0x0000028E03BF5B08>> could not be transformed and will be executed as-is. Please report this to the AutgoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Flatten.call of <tensorflow.python.layers.core.Flatten object at 0x0000028E03BF5B08>>: AttributeError: module 'gast' has no attribute 'Index'
这使我相信结果不可靠。
以下是显示权重如何初始化的代码:
tf.set_random_seed(1)
W1 = tf.get_variable("W1", shape=[4, 4, 3, 8], initializer=tf.contrib.layers.xavier_initializer(seed = 0))
W2 = tf.get_variable("W2", shape=[2, 2, 8, 16], initializer=tf.contrib.layers.xavier_initializer(seed = 0))