24 lines
411 B
Python
24 lines
411 B
Python
# prepare.py
|
|
#
|
|
# author: deng
|
|
# date : 20231228
|
|
|
|
import yaml
|
|
|
|
import torch
|
|
|
|
|
|
def prepare(params_path: str = 'params.yaml') -> None:
|
|
"""Preprocess data save as npz for model training
|
|
|
|
Args:
|
|
params_path (str, optional): path of parameter yaml. Defaults to 'params.yaml'.
|
|
"""
|
|
|
|
with open(params_path, 'r') as f:
|
|
params = yaml.safe_load(f)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
prepare()
|