📅  最后修改于: 2022-03-11 14:46:00.720000             🧑  作者: Mango
error = torch.abs(preds - targets).sum().data
squared_error = ((preds - targets)*(preds - targets)).sum().data
runnning_mae += error
runnning_mse += squared_error