ValueError:内核中的输入通道数应指定1组的通道数

时间:2019-10-13 14:31:40

标签: python machine-learning keras conv-neural-network theano

Layer (type)                 Output Shape              Param #   
=================================================================
conv2d_1 (Conv2D)            (None, 3, 32, 96)         2688      
_________________________________________________________________
activation_1 (Activation)    (None, 3, 32, 96)         0         
_________________________________________________________________
conv2d_2 (Conv2D)            (None, 3, 32, 96)         83040     
_________________________________________________________________
activation_2 (Activation)    (None, 3, 32, 96)         0         
_________________________________________________________________
conv2d_3 (Conv2D)            (None, 2, 16, 96)         83040     
_________________________________________________________________
dropout_1 (Dropout)          (None, 2, 16, 96)         0         
_________________________________________________________________
conv2d_4 (Conv2D)            (None, 2, 16, 192)        166080    
_________________________________________________________________
activation_3 (Activation)    (None, 2, 16, 192)        0         
_________________________________________________________________
conv2d_5 (Conv2D)            (None, 2, 16, 192)        331968    
_________________________________________________________________
activation_4 (Activation)    (None, 2, 16, 192)        0         
_________________________________________________________________
conv2d_6 (Conv2D)            (None, 1, 8, 192)         331968    
_________________________________________________________________
dropout_2 (Dropout)          (None, 1, 8, 192)         0         
_________________________________________________________________
conv2d_7 (Conv2D)            (None, 1, 8, 192)         331968    
_________________________________________________________________
activation_5 (Activation)    (None, 1, 8, 192)         0         
_________________________________________________________________
conv2d_8 (Conv2D)            (None, 1, 8, 192)         37056     
_________________________________________________________________
activation_6 (Activation)    (None, 1, 8, 192)         0         
_________________________________________________________________
conv2d_9 (Conv2D)            (None, 1, 8, 10)          1930      
_________________________________________________________________
global_average_pooling2d_1 ( (None, 10)                0         
_________________________________________________________________
activation_7 (Activation)    (None, 10)                0         
=================================================================
Total params: 1,369,738
Trainable params: 1,369,738
Non-trainable params: 0
_________________________________________________________________
None

ValueError:

  

内核中输入通道的数量应指定数量   1组频道的数量

在处理上述异常期间,发生了另一个异常:

ValueError

  

内向追踪(最近通话最近一次)   ()

----> 1个分数= model.evaluate(X_test,Y_test,verbose = 1)

ValueError:

  

内核中输入通道的数量应指定数量   1组频道的数量

应用导致错误的节点:

AbstractConv2d{convdim=2, border_mode='half', subsample=(1, 1), filter_flip=True, imshp=(None, 32, 3, 32), kshp=(96, 32, 3, 3), filter_dilation=(1, 1), num_groups=1, unshared=False}(InplaceDimShuffle{0,3,1,2}.0, InplaceDimShuffle{3,2,0,1}.0)

0 个答案:

没有答案