(args, pose_, pose, device)
| 319 | return torch.sqrt(torch.mean(torch.abs(input - target).pow(2))) |
| 320 | |
| 321 | def PoseLoss(args, pose_, pose, device): |
| 322 | loss_func = nn.MSELoss() |
| 323 | predict_pose = pose_.to(device) # maynot need reshape |
| 324 | pose_loss = loss_func(predict_pose, pose) |
| 325 | return pose_loss |
| 326 | |
| 327 | def to_img(x): |
| 328 | x = (x + 1.) * 0.5 |
no outgoing calls
no test coverage detected