m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/experiment/__main__.py
blob: bf4de94fc4b92a40a9a74846825ad7e3efc94a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sys

import torch

from experiment.experiment import Experiment

file = None
if len(sys.argv) < 2:
    print('Provide YAML configuration file as argument')
    exit(1)

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
file = sys.argv[1]
prefix = sys.argv[2] if len(sys.argv) > 2 else ''

experiment = Experiment(file, prefix, device)
experiment.run()