[6bf179]: / ecg_gan / config.py

Download this file

20 lines (14 with data), 401 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import numpy as np
import torch
class Config:
csv_path = ''
seed = 2021
device = 'cuda:0' if torch.cuda.is_available() else 'cpu'
def seed_everything(seed: int):
np.random.seed(seed)
torch.manual_seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed(seed)
if __name__ == '__main__':
config = Config()
seed_everything(config.seed)