考 https://blog.csdn.net/qq_24193303/article/details/89301791
做了详细注释
一、下载Tensorboard中的loss曲线的数据
1.选中左上角的 Show data download links
二、修改下载后的文件内容及格式
选在csv文件格式下载后的文件,并且最上面一行是 Wall time,Step,Value
我们需要将最上面的一行删除
注意:删除要彻底,即首行不留白,第一行是数据
三、使用Pycharm 进行数据处理
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
from matplotlib.font_manager import FontProperties
import csv
def readcsv(files):
csvfile = open(files,'r')
plots = csv.reader(csvfile, delimiter=',')
x = []
y = []
for row in plots:
y.append(float(row[2]))
x.append(float(row[1]))
return x,y
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = 'NSimSun,Times New Roman'
plt.figure()
x2, y2 = readcsv("D:/run_train-tag-los