IRMVLab / Point-Mamba

Point Mamba
105 stars 12 forks source link

Training Error for run_seg_scannet.py #1

Open YoungbeomYoo opened 7 months ago

YoungbeomYoo commented 7 months ago

Hi, I'm trying to reproduce your scannet segmentation code following your README directions. But the RuntimeError came out.

RuntimeError: Expected to mark a variable ready only once. This error is caused by one of the following reasons: 1) Use of a module parameter outside the forward function. Please make sure model parameters are not shared across multiple concurrent forward-backward passes. or try to use _set_static_graph() as a workaround if this module graph does not change during training loop.2) Reused parameters in multiple reentrant backward passes. For example, if you use multiple checkpoint functions to wrap the same part of your model, it would result in the same set of parameters been used by different reentrant backward passes multiple times, and hence marking a variable ready multiple times. DDP does not support such use cases in default. You can try to use _set_static_graph() as a workaround if your module graph does not change over iterations. Parameter at index 611 with name backbone.layers.3.blocks.1.mamba.proj.bias has been marked as ready twice. This means that multiple autograd engine hooks have fired for this particular parameter during this iteration.

How to solve this problem? (I changed seg_scannet.yaml conifg file's MODEL: find_unused_parameters: True)

Aristo23333 commented 7 months ago

Hi, I'm trying to reproduce your scannet segmentation code following your README directions. But the RuntimeError came out.

RuntimeError: Expected to mark a variable ready only once. This error is caused by one of the following reasons: 1) Use of a module parameter outside the forward function. Please make sure model parameters are not shared across multiple concurrent forward-backward passes. or try to use _set_static_graph() as a workaround if this module graph does not change during training loop.2) Reused parameters in multiple reentrant backward passes. For example, if you use multiple checkpoint functions to wrap the same part of your model, it would result in the same set of parameters been used by different reentrant backward passes multiple times, and hence marking a variable ready multiple times. DDP does not support such use cases in default. You can try to use _set_static_graph() as a workaround if your module graph does not change over iterations. Parameter at index 611 with name backbone.layers.3.blocks.1.mamba.proj.bias has been marked as ready twice. This means that multiple autograd engine hooks have fired for this particular parameter during this iteration.

How to solve this problem? (I changed seg_scannet.yaml conifg file's MODEL: find_unused_parameters: True)

Hello, thank you very much for your interest in our project. I noticed that you mentioned that you changed a parameter: find_unused_parameters: True, which is a parameter inherited from our baseline code that I didn't change in the actual experiment, I'm not sure if it's a bug caused by this change. You can try to modify back to my settings for experimentation, if there are other questions, you can also provide you with detailed modifications, we will discuss it again, thank you.

USTCLH commented 7 months ago

Hello, you can try to change return input_ids to return self.forward_features(input_ids, inference_params) in code to solve this problem