1 Star 0 Fork 0

于h/BlazePose-tensorflow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
analysis.py 903 Bytes
一键复制 编辑 原始数据 按行查看 历史
# save the training record
import json
import numpy as np
from config import json_name
def save_record(train_loss_results, train_accuracy_results, val_accuracy_results):
train_record = dict()
train_record["train_loss"] = list(np.float64(train_loss_results))
train_record["train_accuracy"] = list(np.float64(train_accuracy_results))
train_record["val_accuracy"] = list(np.float64(val_accuracy_results))
with open(json_name, 'w') as f:
json.dump(train_record, f)
return 0
def load_record():
with open(json_name, 'r') as f:
train_record = json.load(f)
# convert list to numpy
train_loss_results = np.float64(train_record["train_loss"])
train_accuracy_results = np.float64(train_record["train_accuracy"])
val_accuracy_results = np.float64(train_record["val_accuracy"])
return train_loss_results, train_accuracy_results, val_accuracy_results
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuhuan1021/BlazePose-tensorflow.git
git@gitee.com:yuhuan1021/BlazePose-tensorflow.git
yuhuan1021
BlazePose-tensorflow
BlazePose-tensorflow
master

搜索帮助