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

Problem about loading the torso pretrained models #30

Closed
sstzal opened this issue Sep 1, 2021 · 9 comments
Closed

Problem about loading the torso pretrained models #30

sstzal opened this issue Sep 1, 2021 · 9 comments

Comments

@sstzal
Copy link

sstzal commented Sep 1, 2021

Hi, yudong
When I try to load the torso pretrained models for a better initialization. I get an error.
image
So why the pretrained models donot have the ['network_audattnet_state_dict']. How can I handle this issue?
Thanks!

@sstzal
Copy link
Author

sstzal commented Sep 1, 2021

Hi, yudong
When I try to load the torso pretrained models for a better initialization. I get an error.
image
So why the pretrained models donot have the ['network_audattnet_state_dict']. How can I handle this issue?
Thanks!

Should I set the 'with_audatt' to be False?

@YudongGuo
Copy link
Owner

Hi, yudong
When I try to load the torso pretrained models for a better initialization. I get an error.
image
So why the pretrained models donot have the ['network_audattnet_state_dict']. How can I handle this issue?
Thanks!

Should I set the 'with_audatt' to be False?

Yep. The reason is that the torso model shares the AudioAttention module with the head model, so there is no need to load it again.

@YudongGuo
Copy link
Owner

Hi, yudong
When I try to load the torso pretrained models for a better initialization. I get an error.
image
So why the pretrained models donot have the ['network_audattnet_state_dict']. How can I handle this issue?
Thanks!

Should I set the 'with_audatt' to be False?

Yep. The reason is that the torso model shares the AudioAttention module with the head model, so there is no need to load it again.

From your output, the head model does not contain the audattnet, didn't you include it in the head model training?

@sstzal
Copy link
Author

sstzal commented Sep 1, 2021

Hi, yudong
When I try to load the torso pretrained models for a better initialization. I get an error.
image
So why the pretrained models donot have the ['network_audattnet_state_dict']. How can I handle this issue?
Thanks!

Should I set the 'with_audatt' to be False?

Yep. The reason is that the torso model shares the AudioAttention module with the head model, so there is no need to load it again.

From your output, the head model does not contain the audattnet, didn't you include it in the head model training?

I have audattnet in the headnerf. I just mistakenly replaced the ckpt to the pretrained troso model ( add "--ft_path ./AD-NeRF-master/pretrained_models/500000_body.tar" to the command). Now I'm a little confused about how to load the pre-training troso model.

@sstzal sstzal closed this as completed Sep 1, 2021
@sstzal sstzal reopened this Sep 1, 2021
@YudongGuo
Copy link
Owner

You can just put your trained head model and the pretrained torso model in the torso checkpoint folder (dataset/$id/logs/$id_com by default). You also need to manually adjust the 'global_step' in line 789 to 0.

@sstzal
Copy link
Author

sstzal commented Sep 1, 2021

I find the torso model has these keys:
image
and the head model has these:
image

So when I train the torso nerf model , shoule I load
image
from troso model and
image
from head model?

@sstzal
Copy link
Author

sstzal commented Sep 1, 2021

You can just put your trained head model and the pretrained torso model in the torso checkpoint folder (dataset/$id/logs/$id_com by default). You also need to manually adjust the 'global_step' in line 789 to 0.

image
I read the code. And I think if i put these two model in the dataset/$id/logs/$id_com. The code will only load one model since ckpt_path = ckpts[-1]. Can you tell me what's wrong with my understanding?

@YudongGuo
Copy link
Owner

You can just put your trained head model and the pretrained torso model in the torso checkpoint folder (dataset/$id/logs/$id_com by default). You also need to manually adjust the 'global_step' in line 789 to 0.

image
I read the code. And I think if i put these two model in the dataset/$id/logs/$id_com. The code will only load one model since ckpt_path = ckpts[-1]. Can you tell me what's wrong with my understanding?

In the code here, it only searches the file containing specific substring ('head' or 'torso').

@sstzal
Copy link
Author

sstzal commented Sep 1, 2021

I get it! Thanks!

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

2 participants