()
| 348 | for iter_idx in range(num_iter): |
| 349 | |
| 350 | def closure(): |
| 351 | optimizer.zero_grad() |
| 352 | betas_video = self._expand_betas(body_pose.shape[0], betas) |
| 353 | |
| 354 | loss_dict = self.evaluate( |
| 355 | global_orient=global_orient, |
| 356 | body_pose=body_pose, |
| 357 | betas=betas_video, |
| 358 | transl=transl, |
| 359 | keypoints2d=keypoints2d, |
| 360 | keypoints2d_conf=keypoints2d_conf, |
| 361 | keypoints2d_weight=keypoints2d_weight, |
| 362 | keypoints3d=keypoints3d, |
| 363 | keypoints3d_conf=keypoints3d_conf, |
| 364 | keypoints3d_weight=keypoints3d_weight, |
| 365 | joint_prior_weight=joint_prior_weight, |
| 366 | shape_prior_weight=shape_prior_weight, |
| 367 | smooth_loss_weight=smooth_loss_weight, |
| 368 | pose_prior_weight=pose_prior_weight, |
| 369 | pose_reg_weight=pose_reg_weight, |
| 370 | limb_length_weight=limb_length_weight, |
| 371 | joint_weights=joint_weights) |
| 372 | |
| 373 | loss = loss_dict['total_loss'] |
| 374 | loss.backward() |
| 375 | return loss |
| 376 | |
| 377 | loss = optimizer.step(closure) |
| 378 | if iter_idx > 0 and pre_loss is not None and ftol > 0: |
nothing calls this directly
no test coverage detected