PKU-EPIC / UniDexGrasp

Official code for "UniDexGrasp: Universal Robotic Dexterous Grasping via Learning Diverse Proposal Generation and Goal-Conditioned Policy" (CVPR 2023)
102 stars 10 forks source link

About ipdf-loss #28

Open gotochen opened 3 weeks ago

gotochen commented 3 weeks ago

When I run ipdf_train,get a runtime error:only tensors of floating point and complex dtype can require gradients.Or get a Attributeerror:'int'object has no attribute 'backward'. How can I solve this problem?rewrite the compute_loss function in model.py? image image

XYZ-99 commented 3 weeks ago

It seems the loss type is int whereas it is expected to be a floating point. You could first check the component of loss to find which one is making the loss an int. We compute the loss here: https://github.com/PKU-EPIC/UniDexGrasp/blob/36c9bfcf7cedc987dd15e2384c548e51d5aadc21/dexgrasp_generation/network/models/model.py#L91-L109 Feel free to follow up if the problem isn't clear still.