forked from alxhoff/TensorNAS-Demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DemoLayers.py
54 lines (43 loc) · 1.08 KB
/
DemoLayers.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from Demos import GetData
a, b, c, d, input_tensor_shape = GetData()
from TensorNAS.Layers import Conv2D, Reshape, Dropout, Flatten
from TensorNAS.Layers.Dense import HiddenDense, OutputDense
from TensorNAS.Layers.Pool import MaxPool3D, MaxPool2D
print("Unit testing Layers")
test = Conv2D.Layer(input_tensor_shape)
print(test.get_name())
test.print()
test.mutate()
test = Flatten.Layer(input_tensor_shape)
print(test.get_name())
test.print()
test.mutate()
test = Dropout.Layer(input_tensor_shape)
print(test.get_name())
test.print()
test.mutate()
test = HiddenDense.Layer(input_tensor_shape)
print(test.get_name())
test.print()
test.mutate()
test.print()
test = OutputDense.Layer(input_tensor_shape, 10)
print(test.get_name())
test.print()
test.mutate()
test.print()
test = Reshape.Layer(input_tensor_shape, [1, 784])
print(test.get_name())
test.print()
test.mutate()
test.print()
test = MaxPool2D.Layer(input_tensor_shape)
print(test.get_name())
test.print()
test.mutate()
test.print()
test = MaxPool3D.Layer(input_tensor_shape)
print(test.get_name())
test.print()
test.mutate()
test.print()