質問編集履歴

2

情報の修正

2018/11/27 04:08

投稿

taiyo2017
taiyo2017

スコア170

test CHANGED
File without changes
test CHANGED
@@ -3,3 +3,67 @@
3
3
  どんなにエポックを繰り返しても学習精度が0.5ほどになってしまいます。どう言う原因が考えられますか?
4
4
 
5
5
  データ数は1万件もあり、過学習の可能性はないです。
6
+
7
+
8
+
9
+ コードは以下のように書きました。
10
+
11
+ ```ここに言語を入力
12
+
13
+ # coding: utf-8
14
+
15
+ import tensorflow as tf
16
+
17
+ import tflearn
18
+
19
+
20
+
21
+ from tflearn.layers.core import input_data,dropout,fully_connected
22
+
23
+ from tflearn.layers.conv import conv_2d, max_pool_2d
24
+
25
+ from tflearn.layers.normalization import local_response_normalization
26
+
27
+ from tflearn.layers.estimator import regression
28
+
29
+
30
+
31
+ tf.reset_default_graph()
32
+
33
+ net = input_data(shape=[None, 4, 42])
34
+
35
+ net = conv_2d(net, 4, 16, activation='relu')
36
+
37
+ net = max_pool_2d(net, 1)
38
+
39
+ net = tflearn.activations.relu(net)
40
+
41
+ net = dropout(net, 0.5)
42
+
43
+ net = tflearn.fully_connected(net, 2, activation='softmax')
44
+
45
+ net = tflearn.regression(net, optimizer='adam', learning_rate=0.5, loss='categorical_crossentropy')
46
+
47
+
48
+
49
+ model = tflearn.DNN(net)
50
+
51
+
52
+
53
+ model.fit(np.array(trainDataSet), np.array(trainLabel), n_epoch=400, batch_size=32, validation_set=0.1, show_metric=True)
54
+
55
+
56
+
57
+ pred = np.array(model.predict(np.array(testDataSet)).argmax(axis=1))
58
+
59
+
60
+
61
+ label = np.array(testLabel).argmax(axis=0)
62
+
63
+ accuracy = np.mean(pred == label, axis=0)
64
+
65
+
66
+
67
+ print(accuracy)
68
+
69
+ ```

1

情報の追加

2018/11/27 04:07

投稿

taiyo2017
taiyo2017

スコア170

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,5 @@
1
1
  CNNでディープラーニングをしています。
2
2
 
3
3
  どんなにエポックを繰り返しても学習精度が0.5ほどになってしまいます。どう言う原因が考えられますか?
4
+
5
+ データ数は1万件もあり、過学習の可能性はないです。