Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will you like me to optimize the code repo? #12

Open
IrohXu opened this issue Oct 20, 2022 · 8 comments
Open

Will you like me to optimize the code repo? #12

IrohXu opened this issue Oct 20, 2022 · 8 comments

Comments

@IrohXu
Copy link
Contributor

IrohXu commented Oct 20, 2022

Hi, chaytonmin:

Thanks for your ideas in applying MAE to 3D object detection in CP. I checked your code and noticed that some parts can be replaced by functions in torch. For example, the line 165-170 in voxel_mae.py. It may accelerate the training speed If you like, I can publish the code into your repo.

Best

@chaytonmin
Copy link
Owner

Hi, chaytonmin:

Thanks for your ideas in applying MAE to 3D object detection in CP. I checked your code and noticed that some parts can be replaced by functions in torch. For example, the line 165-170 in voxel_mae.py. It may accelerate the training speed If you like, I can publish the code into your repo.

Best

Great!
Thanks for your excellent idea.

@jlqzzz
Copy link

jlqzzz commented Feb 21, 2023

@IrohXu @chaytonmin

Hello,

After code optimization, I encountered an error "AttributeError: module 'torch' has no attribute 'argwhere'".

    id_list_select_30 = torch.argwhere(select_30==True).reshape(torch.argwhere(select_30==True).shape[0])
    id_list_select_30to50 = torch.argwhere(select_30to50==True).reshape(torch.argwhere(select_30to50==True).shape[0])
    id_list_select_50 = torch.argwhere(select_50==True).reshape(torch.argwhere(select_50==True).shape[0])

It looks like the problem of the torch.argwhere().

My version of pytorch is 1.8.0. What is your version of pytorch? Have you ever encountered the above problems?

@IrohXu
Copy link
Contributor Author

IrohXu commented Feb 21, 2023

Update it to 1.13 might help.

See: https://pytorch.org/docs/stable/generated/torch.argwhere.html

@jlqzzz
Copy link

jlqzzz commented Feb 21, 2023

@IrohXu

Hello,

Thank you for your timely reply. That is to say, there is no such function in the case of pytorch<1.13?

Is there a backward compatible implementation? Because the version of pytorch1.13 may be too new and may not be a commonly used version.

@IrohXu
Copy link
Contributor Author

IrohXu commented Feb 21, 2023

I remember pytorch added argwhere func in 1.11. You can roll back to the old version locally if you need. But it is very slow during training.

@463727502
Copy link

我记得 pytorch 在 1.11 中添加了 argwhere func。如果需要,可以在本地回滚到旧版本。但是在训练过程中非常慢。

你好,我也是报'火炬'没有属性'argwhere'”的错,然后我也在虚拟环境切换到pytorch1.12,然后pcdet得要重新编译,就装不上了,报的是pytorch太高的原因错,您是如何解决的

@463727502
Copy link

我记得 pytorch 在 1.11 中添加了 argwhere func。如果需要,可以在本地回滚到旧版本。但是在训练过程中非常慢。

您的环境配置是什么样的

@ChunZheng2022
Copy link

@IrohXu

Hello,

Thank you for your timely reply. That is to say, there is no such function in the case of pytorch<1.13?

Is there a backward compatible implementation? Because the version of pytorch1.13 may be too new and may not be a commonly used version.

For lower version pytorch, use 'torch. nonzero' instead. You can view this answer #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants