——mnist_data_image.py------
1 # -*- coding: utf-8 -*-
2
3 import sys
4 import numpy as np
5 np.random.seed(20160715)
6
7 from keras.datasets import mnist
8 from keras.utils import np_utils
9
10 (X_train, y_train), (X_test, y_test) = mnist.load_data()
11
12 for xs in X_train[1]:
13 for x in xs:
14 sys.stdout.write('%03d ' % x)
15 sys.stdout.write('\n')
16
17 print('first sample is %d' % y_train[0])
18
19 Y_train = np_utils.to_categorical(y_train, 10)
20
21 sys.stdout.write('[')
22 for y in Y_train[0]:
23 sys.stdout.write('%f ' % y)
24 sys.stdout.write(']\n')
2017年8月16日水曜日
Imaging mnist data
fd-find
$ sudo apt install fd-find $ fdfind 石
-
$ cargo install cargo-generate $ cargo generate —git https://github.com/rustwasm/wasm-pack-template Project calc-wasm $ cd calc-wasm ...
-
$ sudo apt install fd-find $ fdfind 石