質問編集履歴
4
タブ修正
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
3
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -78,7 +78,7 @@
|
|
78
78
|
|
79
79
|
_________________________________________________________________
|
80
80
|
|
81
|
-
Layer (type) Output Shape Param
|
81
|
+
Layer (type) Output Shape Param
|
82
82
|
|
83
83
|
=================================================================
|
84
84
|
|
2
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,8 +46,6 @@
|
|
46
46
|
|
47
47
|
|
48
48
|
|
49
|
-
#ラベル生成
|
50
|
-
|
51
49
|
from sklearn.preprocessing import LabelEncoder
|
52
50
|
|
53
51
|
import numpy as np
|
@@ -60,13 +58,9 @@
|
|
60
58
|
|
61
59
|
|
62
60
|
|
63
|
-
# ラベルデータをカテゴリの1-hotベクトルにエンコードする
|
64
|
-
|
65
61
|
one_hot_labels = keras.utils.to_categorical(vec, num_classes=10)
|
66
62
|
|
67
63
|
|
68
|
-
|
69
|
-
# 各イテレーションのバッチサイズを32で学習を行なう(fitでデータとラベルを一括で渡す)
|
70
64
|
|
71
65
|
model.fit(col, one_hot_labels, epochs=10, batch_size=32)
|
72
66
|
|
1
コード修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -43,16 +43,6 @@
|
|
43
43
|
loss='categorical_crossentropy',
|
44
44
|
|
45
45
|
metrics=['accuracy'])
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
# ダミーデータ作成
|
50
|
-
|
51
|
-
#import numpy as np
|
52
|
-
|
53
|
-
#data = np.random.random((32, 100))
|
54
|
-
|
55
|
-
#labels = np.random.randint(4, size=(1000, 1))
|
56
46
|
|
57
47
|
|
58
48
|
|