运行convolutional.py报错
File "D:\Python_The second stage\mnist\model.py", line 14, in conv2b
return tf.nn.conv2d([1,1,1,1],padding="SAME")
TypeError: conv2d() missing 2 required positional arguments: 'filter' and 'strides'
以上是运行convolutional.py报错
def convolutional(x,keep_prob): def conv2b(x,W): return tf.nn.conv2d([1,1,1,1],padding="SAME") def max_pool_2x2(x): return tf.nn.max_pool(x,ksize=[1,2,2,1],strides=[1,2,2,1],padding="SAME") def weight_variable(shape): initial=tf.truncated_normal(shape,stddev=0.1) return tf.Variable(initial) def bias_variable(shape): initial=tf.constant(0.1,shape=shape) return tf.Variable(initial)
model.py代码和你一样
是什么原因?