-
Notifications
You must be signed in to change notification settings - Fork 0
/
final_test.py
executable file
·90 lines (90 loc) · 2.93 KB
/
final_test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env python3
from mpunet.models import UNet3D, UNet
from tensorflow import keras
from heartnet.layers import RobustScaler
from heartnet.models.base import BaseModelTraining
for i in range(3):
# base3D = BaseModelTraining(
# UNet3D(2, dim=112, out_activation="softmax"), name=f"pad{i}"
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate()
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, out_activation="softmax"), name=f"shrink{i}"
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate()
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, out_activation="softmax"),
# name=f"aug-96-0.333-100-{i}"
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate()
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, out_activation="softmax"),
# name=f"augmentation-{i}"
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate()
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, out_activation="softmax", depth=4),
# name=f"hyper-20-30-1-4-{i}"
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate()
# base = BaseModelTraining(
# UNet(2, depth=4, dim=128, out_activation="softmax", complexity_factor=2),
# f"base{i}"
# )
# base.batch_size = 64
# base.setup(True)
# base.evaluate()
# base = BaseModelTraining(keras.Sequential([
# keras.Input(shape=(128, 128, 1)),
# RobustScaler(),
# UNet(2,
# depth=4,
# dim=128,
# out_activation="softmax",
# complexity_factor=2)
# ]),
# f"base-data-robust-{i}")
# base.batch_size = 64
# base.setup(True)
# base.evaluate(True)
# base3D = BaseModelTraining(
# UNet3D(2, dim=112, out_activation="softmax"), name=f"pad-data-{i}", full=True
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate(True)
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, out_activation="softmax"), name=f"shrink-data-{i}", full=True
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate(True)
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, out_activation="softmax"), name=f"hyper-1-data-{i}", full=True
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate(True)
# base3D = BaseModelTraining(
# UNet3D(2, dim=96, depth=4, out_activation="softmax"), name=f"hyper-2-data-{i}", full=True
# )
# base3D.batch_size = 1
# base3D.setup(True)
# base3D.evaluate(True)
base3D = BaseModelTraining(keras.Sequential(
[keras.Input(shape=(112, 112, 112, 1)),
RobustScaler(),
UNet3D(2, dim=112, out_activation="softmax")]),
name=f"pad-robust-scaled-{i}")
base3D.setup(True)
base3D.evaluate(True)