卷积神经网络丢包错误

时间:2018-12-02 14:06:54

标签: tensorflow neural-network conv-neural-network dropout

我遇到以下错误,我不知道如何解决: convnet =退出(convnet,0.8) TypeError:“浮动”对象不可调用

 convnet = input_data(shape=[None, img_size, img_size, 1], name='input')

 convnet = conv_2d(convnet, 32, 5, activation='relu')
 convnet = max_pool_2d(convnet, 5)

convnet = conv_2d(convnet, 64, 5, activation='relu')
convnet = max_pool_2d(convnet, 5)

convnet = fully_connected(convnet, 1024, activation='relu')
convnet = dropout(convnet, 0.8)

convnet = fully_connected(convnet, 2, activation='softmax')
convnet = regression(convnet, optimizer='adam', learning_rate=LR, 
loss='categorical_crossentropy', name='targets')

model = tflearn.DNN(convnet, tensorboard_dir='log')r code here

1 个答案:

答案 0 :(得分:0)

尝试

convnet = dropout( convnet , rate=0.8 )