Merge branch 'master' of gitlab.lrz.de:mobile-ifi/inter_challenge_2020
This commit is contained in:
commit
c1c367ace7
10
main.py
10
main.py
@ -20,6 +20,15 @@ warnings.filterwarnings('ignore', category=FutureWarning)
|
|||||||
warnings.filterwarnings('ignore', category=UserWarning)
|
warnings.filterwarnings('ignore', category=UserWarning)
|
||||||
|
|
||||||
|
|
||||||
|
def fix_all_random_seeds(config_obj):
|
||||||
|
import numpy as np
|
||||||
|
import torch
|
||||||
|
import random
|
||||||
|
np.random.seed(config.main.seed)
|
||||||
|
torch.manual_seed(config.main.seed)
|
||||||
|
random.seed(config.main.seed)
|
||||||
|
|
||||||
|
|
||||||
def run_lightning_loop(config_obj):
|
def run_lightning_loop(config_obj):
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
@ -124,4 +133,5 @@ if __name__ == "__main__":
|
|||||||
from _paramters import main_arg_parser
|
from _paramters import main_arg_parser
|
||||||
|
|
||||||
config = MConfig.read_argparser(main_arg_parser)
|
config = MConfig.read_argparser(main_arg_parser)
|
||||||
|
fix_all_random_seeds(config)
|
||||||
trained_model = run_lightning_loop(config)
|
trained_model = run_lightning_loop(config)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user