绘制loss图


loss_all = {'train':[],'val':[]}
loss_all['train'].append(loss_trn/len(trainloader))
loss_all['val'].append(loss_val/len(valiateloader))
plt.plot(loss_all['train'])
plt.plot(loss_all['val'])

你可能感兴趣的:(深度学习,机器学习,pytorch)