When I tried to validate or test the trained model, an error occurred:
[*****]
diff_operators.py", line 74, in jacobian
jac[:, :, i, :] = grad(y_flat, x, torch.ones_like(y_flat), retain_graph=True, create_graph=False)[0]
return Variable._execution_engine.run_backward(
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
More detailed information:
return self.model.validation_step(*args, **kwargs)
model_outputs = self.model(inputs, gen_cano_mesh=False, eval=True)
model_outputs = self.idhr_network(inputs)
calls /im2mesh/metaavatar_render/renderer/implicit_differentiable_renderer.py", line 89, in forward
= self.ray_tracer(sdf_network,
/im2mesh/metaavatar_render/renderer/ray_tracing.py", line 110, in forward
self.sphere_tracing(batch_size,
/im2mesh/metaavatar_render/renderer/ray_tracing.py", line 247, in sphere_tracing
search_iso_surface_depth(cam_locs,
/im2mesh/utils/root_finding_utils.py", line 424, in search_iso_surface_depth
J_lbs = forward_skinning_jac(valid_x_hat_0, loc, sc_factor, coord_min, coord_max, center, skinning_model, vol_feat, bone_transforms, mask=None)
File "/mnt/lustre/thu/project/human/nb/codelib/arah/im2mesh/utils/root_finding_utils.py", line 216, in forward_skinning_jac
jac, status = diff_operators.jacobian(pi_bar,
Hi, thanks for the excellent work.
When I tried to validate or test the trained model, an error occurred: [*****] diff_operators.py", line 74, in jacobian jac[:, :, i, :] = grad(y_flat, x, torch.ones_like(y_flat), retain_graph=True, create_graph=False)[0]
return Variable._execution_engine.run_backward( RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
More detailed information:
return self.model.validation_step(*args, **kwargs) model_outputs = self.model(inputs, gen_cano_mesh=False, eval=True) model_outputs = self.idhr_network(inputs) calls /im2mesh/metaavatar_render/renderer/implicit_differentiable_renderer.py", line 89, in forward = self.ray_tracer(sdf_network,
/im2mesh/metaavatar_render/renderer/ray_tracing.py", line 110, in forward self.sphere_tracing(batch_size, /im2mesh/metaavatar_render/renderer/ray_tracing.py", line 247, in sphere_tracing search_iso_surface_depth(cam_locs,
/im2mesh/utils/root_finding_utils.py", line 424, in search_iso_surface_depth J_lbs = forward_skinning_jac(valid_x_hat_0, loc, sc_factor, coord_min, coord_max, center, skinning_model, vol_feat, bone_transforms, mask=None) File "/mnt/lustre/thu/project/human/nb/codelib/arah/im2mesh/utils/root_finding_utils.py", line 216, in forward_skinning_jac jac, status = diff_operators.jacobian(pi_bar,
Any suggestions?