InvalidArgumentError Traceback (most recent call last)
~\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py in _create_c_op(graph, node_def, inputs, control_inputs)
1863 try:
-> 1864 c_op = c_api.TF_FinishOperation(op_desc)
1865 except errors.InvalidArgumentError as e:
InvalidArgumentError: Negative dimension size caused by subtracting 2 from 1 for 'max_pooling3d_37/MaxPool3D' (op: 'MaxPool3D') with input shapes: [?,1,240,135,512].
在处理上述异常期间,发生了另一个异常:
ValueError Traceback (most recent call last)
<ipython-input-20-b2b323640e12> in <module>
12 model.add(tf.keras.layers.Conv3D(512 , kernel_size = (3,3,3) ,strides = (1,1,1) , padding = 'same' , activation = 'relu'))
13 model.add(tf.keras.layers.Conv3D(512 , kernel_size = (3,3,3) ,strides = (1,1,1) , padding = 'same' , activation = 'relu'))
---> 14 model.add(tf.keras.layers.MaxPooling3D(pool_size = (2,2,2) , strides = (2,2,2)))
15 model.add(tf.keras.layers.Conv3D(1024 , kernel_size = (3,3,3) ,strides = (1,1,1) , padding = 'same' , activation = 'relu'))
16 model.add(tf.keras.layers.Conv3D(1024 , kernel_size = (3,3,3) ,strides = (1,1,1) , padding = 'same' , activation = 'relu'))
~
答案 0 :(得分:0)
我认为您输入的尺寸可能不正确,或者框架尺寸不够大。输入数据形状有误。