CNNでディープラーニングをしています。
どんなにエポックを繰り返しても学習精度が0.5ほどになってしまいます。どう言う原因が考えられますか?
データ数は1万件もあり、過学習の可能性はないです。
コードは以下のように書きました。
# coding: utf-8 import tensorflow as tf import tflearn from tflearn.layers.core import input_data,dropout,fully_connected from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.normalization import local_response_normalization from tflearn.layers.estimator import regression tf.reset_default_graph() net = input_data(shape=[None, 4, 42]) net = conv_2d(net, 4, 16, activation='relu') net = max_pool_2d(net, 1) net = tflearn.activations.relu(net) net = dropout(net, 0.5) net = tflearn.fully_connected(net, 2, activation='softmax') net = tflearn.regression(net, optimizer='adam', learning_rate=0.5, loss='categorical_crossentropy') model = tflearn.DNN(net) model.fit(np.array(trainDataSet), np.array(trainLabel), n_epoch=400, batch_size=32, validation_set=0.1, show_metric=True) pred = np.array(model.predict(np.array(testDataSet)).argmax(axis=1)) label = np.array(testLabel).argmax(axis=0) accuracy = np.mean(pred == label, axis=0) print(accuracy)
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/27 03:27
2018/11/27 03:43
2018/11/27 03:44
2018/11/27 04:08
2018/11/27 04:08
2018/11/27 11:17 編集
2018/11/29 08:31
2018/11/30 07:34