質問編集履歴
3
a
test
CHANGED
File without changes
|
test
CHANGED
@@ -154,7 +154,7 @@
|
|
154
154
|
|
155
155
|
img_height = 32 # 入力画像の高さ
|
156
156
|
|
157
|
-
img_ch = 3 #
|
157
|
+
img_ch = 3 # 3ch画像で学習
|
158
158
|
|
159
159
|
|
160
160
|
|
2
タイトル修正
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
【Python】KerasとCNNで画像分類
|
1
|
+
【Python】KerasとCNNで画像分類したいが「ValueError: Error when checking target: expected dense_2 to have 2」エラーが出る
|
test
CHANGED
File without changes
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -174,7 +174,7 @@
|
|
174
174
|
|
175
175
|
# クラス0, 1, 2の画像をロード
|
176
176
|
|
177
|
-
for filepath in list_pictures(dirpath + "
|
177
|
+
for filepath in list_pictures(dirpath + "class0"):
|
178
178
|
|
179
179
|
img = img_to_array(load_img(filepath, target_size=(img_width,img_height, img_ch)))
|
180
180
|
|
@@ -184,7 +184,7 @@
|
|
184
184
|
|
185
185
|
|
186
186
|
|
187
|
-
for filepath in list_pictures(dirpath + "
|
187
|
+
for filepath in list_pictures(dirpath + "class1"):
|
188
188
|
|
189
189
|
img = img_to_array(load_img(filepath, target_size=(img_width,img_height, img_ch)))
|
190
190
|
|
@@ -194,7 +194,7 @@
|
|
194
194
|
|
195
195
|
|
196
196
|
|
197
|
-
for filepath in list_pictures(dirpath + "
|
197
|
+
for filepath in list_pictures(dirpath + "class2"):
|
198
198
|
|
199
199
|
img = img_to_array(load_img(filepath, target_size=(img_width,img_height, img_ch)))
|
200
200
|
|