-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen_netron.py
30 lines (21 loc) · 1 KB
/
open_netron.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
import netron
import argparse
import pathlib
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Evaluate a trained model')
parser.add_argument('--model', '-m', action='store', type=pathlib.Path,
required=True, help='Model to be evaluated, or folder containing ')
args = parser.parse_args()
model = args.model
# if model=='pitch':
# train_pitch(dataset_dir=dataset_dir, model_size=model_size, dropout=dropout, gpu_id=gpu_id)
# elif model=='instr':
# train_instrument_classifier(dataset_dir=dataset_dir, model_size=model_size, dropout=dropout, gpu_id=gpu_id)
# elif model=='comb':
# train_combined_model(dataset_dir=dataset_dir, model_size=model_size, dropout=dropout, gpu_id=gpu_id)
if model.is_dir():
for trained_model in model.rglob("*.onnx"):
print(trained_model)
netron.start(str(trained_model))
elif model.is_file():
netron.start(str(model))