質問編集履歴
2
エラー時コード追記2
title
CHANGED
File without changes
|
body
CHANGED
@@ -54,6 +54,10 @@
|
|
54
54
|
print('accuracy:{:.2f}'.format(acc))
|
55
55
|
|
56
56
|
**#以下データ読み込み、予測コード**
|
57
|
+
import numpy as image_np
|
58
|
+
from PIL import Image, ImageOps
|
59
|
+
import os
|
60
|
+
|
57
61
|
#取得画像answer
|
58
62
|
image_ans = (8,9,5,0)
|
59
63
|
|
1
エラー時のコードに追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,6 +6,18 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
```ここに言語を入力
|
9
|
+
%matplotlib inline
|
10
|
+
from __future__ import division, print_function
|
11
|
+
|
12
|
+
from keras import backend as K
|
13
|
+
from keras.datasets import mnist
|
14
|
+
from keras.layers import Activation, Dense, Dropout
|
15
|
+
from keras.layers.normalization import BatchNormalization
|
16
|
+
from keras.models import Sequential
|
17
|
+
from keras.utils.np_utils import to_categorical
|
18
|
+
import numpy as np
|
19
|
+
from sklearn.metrics import classification_report, confusion_matrix
|
20
|
+
|
9
21
|
# Kerasに付属の手書き数字画像データをダウンロード
|
10
22
|
np.random.seed(0)
|
11
23
|
(X_train, labels_train), (X_test, labels_test) = mnist.load_data()
|