You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to successfully write a script that optimizes material parameters for a soft mesh using add_soft_grid. The environment starts with two identical models (model and target_model) and applying a force on the mesh watching it deform. Now, I tried to replace the mesh with the bear example. However, the gradients are exploding giving NaNs along the entire gradient path.
At first, I thought it was because there were more particles for the bear mesh (1986) than the soft grid (125), accumulating more loss per particle. However, when I measured the same number of particles the gradients still explode. I also removed the force on the mesh so they are fixed. Still the loss between the target and model is very high.
Is there something wrong with the initialization of the models? I can try clipping the model but is there some way to stabilize the gradients regardless of the mesh that is inputted? I guess this comes down to difficult gradient optimization architecture design. Would batching possibly work? The thing is, we can't reliably split the model into batches like traditional neural network architectures because we need the entire mesh model to be passed through.
Let me know what you think. Thank you again for this amazing project!
The text was updated successfully, but these errors were encountered:
Upon closer inspection, Seems like add_soft_mesh does not compute mass and consideres all particles as mass=0. In example_walker it seems like modifying the tet_activations is valid, but my script is applying force on particles instead of tetrahedrons.
Could these deficiencies from the soft grid explain this erratic behavior? I'd be happy to submit a PR to extend the robustness of add_soft_mesh.
Hello,
I was able to successfully write a script that optimizes material parameters for a soft mesh using
add_soft_grid
. The environment starts with two identical models (model
andtarget_model
) and applying a force on the mesh watching it deform. Now, I tried to replace the mesh with the bear example. However, the gradients are exploding givingNaN
s along the entire gradient path.At first, I thought it was because there were more particles for the bear mesh (1986) than the soft grid (125), accumulating more loss per particle. However, when I measured the same number of particles the gradients still explode. I also removed the force on the mesh so they are fixed. Still the loss between the target and model is very high.
Is there something wrong with the initialization of the models? I can try clipping the model but is there some way to stabilize the gradients regardless of the mesh that is inputted? I guess this comes down to difficult gradient optimization architecture design. Would batching possibly work? The thing is, we can't reliably split the model into batches like traditional neural network architectures because we need the entire mesh model to be passed through.
Let me know what you think. Thank you again for this amazing project!
The text was updated successfully, but these errors were encountered: