1
當運行該代碼段(第一卷積層在TensorFlow模型):TensorFlow,類型錯誤:random_normal()得到了意想不到的關鍵字參數 'partition_info'
conv2d_layer_one = tf.contrib.layers.convolution2d(
float_image_batch,
num_outputs = 32,
kernel_size = (5, 5),
activation_fn=tf.nn.relu,
weights_initializer = tf.random_normal,
stride =(2, 2),
trainable= True
)
我得到這個錯誤:
TypeError: random_normal() got an unexpected keyword argument 'partition_info'
tf.random_normal函數沒有引入任何參數,比如partition_info,所以我有點困惑,因爲這個錯誤會出現。
我刪除了weights_initializer參數,錯誤消失。如果我再次引入它,錯誤似乎又出現了。