We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e5690b commit 80f614cCopy full SHA for 80f614c
model.py
@@ -0,0 +1,26 @@
1
+
2
+from microesc import train, stats, common
3
4
+def main():
5
+ settings = common.load_experiment('experiments', 'ldcnn20k60')
6
7
+ def build():
8
+ return train.sb_cnn(settings)
9
10
+ m = build()
11
+ m.summary()
12
+ m.save('model.wip.hdf5')
13
14
+ s = settings
15
+ shape = (s['n_mels'], s['frames'], 1)
16
+ model_stats = stats.analyze_model(build, [shape], n_classes=10)
17
18
+ flops, params = model_stats
19
+ inference_flops = { name: v for name, v in flops.items() if not stats.is_training_scope(name) }
20
+ for name, flop in inference_flops.items():
21
+ print(name, flop)
22
23
24
25
+if __name__ == '__main__':
26
+ main()
0 commit comments