init
This commit is contained in:
24
train.py
Normal file
24
train.py
Normal file
@ -0,0 +1,24 @@
|
||||
# train.py
|
||||
#
|
||||
# author: deng
|
||||
# date : 20231228
|
||||
|
||||
import yaml
|
||||
|
||||
import torch
|
||||
from dvclive import Live
|
||||
|
||||
|
||||
def train(params_path: str = 'params.yaml') -> None:
|
||||
"""Train a simple model using Pytorch
|
||||
|
||||
Args:
|
||||
params_path (str, optional): path of config yaml. Defaults to 'params.yaml'.
|
||||
"""
|
||||
|
||||
with open(params_path, 'r') as f:
|
||||
params = yaml.safe_load(f)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
train()
|
||||
Reference in New Issue
Block a user