25 lines
415 B
Python
25 lines
415 B
Python
# 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()
|