model = Sequential()
model.add(Conv2D(filters = 6, kernel_size = 5, strides = 1, activation = 'relu', input_shape = (32,32,3)))
model.add(MaxPooling2D(pool_size = 2, strides = 2))
model.add(Conv2D(filters = 16, kernel_size = 5,strides = 1, activation = 'relu',input_shape = (14,14,6)))
model.add(MaxPooling2D(pool_size = 2, strides = 2))
#Flatten
model.add(Flatten())
model.add(Dense(units = 120, activation = 'relu'))
model.add(密集(单位= 84,激活='relu'))
#Output Layer
model.add(Dense(units = 24, activation = 'softmax'))
# Compile the model with the optimizer:
model.compile(optimizer=indian, loss='categorical_crossentropy', metrics=['accuracy'])
epochs = 10 ; batchsize = 32
mod_h = model.fit(Xtrain, yTrain, batch_size=batchsize,
epochs = epochs,validation_data =(xtest,ytest),shuffle = True,verbose = 1)
model.summary()
ValueError: Tensor("conv2d_1/kernel:0", shape=(5, 5, 3, 6), dtype=float32_ref) must be from the same graph as Tensor("sub:0", shape=(), dtype=float32).