-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtesting.py
40 lines (22 loc) · 830 Bytes
/
testing.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import tensorflow as tf
tf.get_logger().setLevel('INFO')
from auto_cnn.gan import AutoCNN
import random
random.seed(42)
tf.random.set_seed(42)
def mnist_test():
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
values = x_train.shape[0] // 2
data = {'x_train': x_train[:values], 'y_train': y_train[:values], 'x_test': x_test, 'y_test': y_test}
a = AutoCNN(5, 1, data)
a.run()
def cifar10_test():
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.cifar10.load_data()
values = x_train.shape[0]
data = {'x_train': x_train[:values], 'y_train': y_train[:values], 'x_test': x_test, 'y_test': y_test}
a = AutoCNN(20, 10, data, epoch_number=10)
a.run()
if __name__ == '__main__':
mnist_test()