Two gpu training
ymxlzgy opened this issue · comments
Can I use two 12G gpu to train this code. I have modified some parts but it only uses one. What should I do?
Currently, you need one GPU with >24GB VRAM because the full grasping data is loaded to VRAM for efficiency reasons.
You can try to move the grasp data to another GPU, here:
contact_graspnet/contact_graspnet/tf_train_ops.py
Lines 249 to 254 in 6ae59a5
However, it could be slow due to communication overhead between the GPUs. Alternatively, if it is not about reproducing results, use less scenes for training. Or feed the grasp data in batches during training (also has some communication overhead).
Thanks for your answer. Besides this, I also want to ask that:
contact_graspnet/contact_graspnet/scene_renderer.py
Lines 117 to 119 in 6ae59a5
Why do you transform the vertices? Is there any advantage?
Also here:
contact_graspnet/tools/create_table_top_scenes.py
Lines 120 to 121 in f28013a
and
contact_graspnet/tools/create_table_top_scenes.py
Lines 359 to 360 in f28013a
The original grasp annotations are defined wrt. the object's coordinate system placed at the mean of vertices, so we kept this definition also for the scenes. If you have grasp annotations wrt. another object coordinate frame, you can probably just remove these lines.
Thanks for your time and explanation! I close this issue for now. If I have other questions in the future, I will ask again. Thanks in advance!