1 Star 0 Fork 0

zhoub86/VDNet-TF-2.0

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
summaries.py 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
Stavros Giorgis 提交于 2019-11-06 22:36 . Finalize project
import csv
import os
def save_losses(epoch, losses, checkpoint_directory):
with open(os.path.join(checkpoint_directory, 'loss_history.csv'), mode='a', newline='') as csv_file:
writer = csv.writer(csv_file, delimiter=';')
losses = [[
epoch,
float(losses['train_loss'].result()),
float(losses['train_mse'].result()),
float(losses['validation_mse'].result()),
float(losses['validation_psnr'].result()),
float(losses['validation_ssim'].result())
]]
writer.writerows(losses)
def save_simulation_losses(epoch, losses, checkpoint_directory):
with open(os.path.join(checkpoint_directory, 'loss_history.csv'), mode='a', newline='') as csv_file:
writer = csv.writer(csv_file, delimiter=';')
losses = [[
epoch,
float(losses['train_loss'].result()),
float(losses['train_mse'].result()),
float(losses['train_psnr'].result()),
float(losses['train_ssim'].result())
]]
writer.writerows(losses)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhoub86/VDNet-TF-2.0.git
git@gitee.com:zhoub86/VDNet-TF-2.0.git
zhoub86
VDNet-TF-2.0
VDNet-TF-2.0
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385