(args, pose_, pose, device)
| 136 | return loss |
| 137 | |
| 138 | def PoseLoss(args, pose_, pose, device): |
| 139 | loss_func = nn.MSELoss() |
| 140 | predict_pose = pose_.reshape(args.batch_size, 12).to(device) # maynot need reshape |
| 141 | pose_loss = loss_func(predict_pose, pose) |
| 142 | return pose_loss |
| 143 | |
| 144 | def prepare_batch_render(args, pose, batch_size, target_, H, W, focal, half_res=True, rand=True): |
| 145 | ''' Break batch of images into rays ''' |
no outgoing calls
no test coverage detected