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

AttributeError: 'NoneType' object has no attribute 'view' #24

Open
zhoupeizhu opened this issue Mar 9, 2022 · 5 comments
Open

AttributeError: 'NoneType' object has no attribute 'view' #24

zhoupeizhu opened this issue Mar 9, 2022 · 5 comments

Comments

@zhoupeizhu
Copy link

when I run train_transformed_rays.py,the error occur.And the argument ray_directions_ablation in train_utils.py is None,but the function in train_transformed_rays.py does not have the correspond input.
thanks.

@HyunsooCha
Copy link

I'm not the author, but I solved the problem.
The link would be helpful to you: #16 (comment)
After doing this, there are no errors related to the ablation study.

@zhoupeizhu
Copy link
Author

I'm not the author, but I solved the problem. The link would be helpful to you: #16 (comment) After doing this, there are no errors related to the ablation study.

Thanks very much. I added the input ray_directions_ablation=ray_directions.The problem is solved temporarily.

@Chopin68
Copy link

我不是作者,但解决了这个问题。该链接后自动错误评论,我没有帮助:#16执行此操作与消融研究相关的。

非常感谢。我添加了输入ray_directions_ablation=ray_directions。暂时解决了问题。

In which line or file did you add this line of input? I also encountered this problem

Traceback (most recent call last):
File "K:\GAN\4D-Facial-Avatars-main\nerface_code\nerf-pytorch\train_transformed_rays.py", line 602, in
main()
File "K:\GAN\4D-Facial-Avatars-main\nerface_code\nerf-pytorch\train_transformed_rays.py", line 336, in main
rgb_coarse, _, _, rgb_fine, _, _, weights = run_one_iter_of_nerf(
File "K:\GAN\4D-Facial-Avatars-main\nerface_code\nerf-pytorch\nerf\train_utils.py", line 206, in run_one_iter_of_nerf
rd_ablations = ray_directions_ablation.view((-1, 3))
AttributeError: 'NoneType' object has no attribute 'view'

@IridescentJiang
Copy link

我不是作者,但解决了这个问题。该链接后自动错误评论,我没有帮助:#16执行此操作与消融研究相关的。

非常感谢。我添加了输入ray_directions_ablation=ray_directions。暂时解决了问题。

In which line or file did you add this line of input? I also encountered this problem

Traceback (most recent call last): File "K:\GAN\4D-Facial-Avatars-main\nerface_code\nerf-pytorch\train_transformed_rays.py", line 602, in main() File "K:\GAN\4D-Facial-Avatars-main\nerface_code\nerf-pytorch\train_transformed_rays.py", line 336, in main rgb_coarse, _, _, rgb_fine, _, _, weights = run_one_iter_of_nerf( File "K:\GAN\4D-Facial-Avatars-main\nerface_code\nerf-pytorch\nerf\train_utils.py", line 206, in run_one_iter_of_nerf rd_ablations = ray_directions_ablation.view((-1, 3)) AttributeError: 'NoneType' object has no attribute 'view'

He was mentioning the file "nerface_code/nerf-pytorch/nerf/train_utils.py". But actually I do not think it is a good idea to "added the input ray_directions_ablation=ray_directions". It is better to follow the author's suggestion in #16 that commenting all the code with "ablation". I tried this and I can training now.

@Ben-chen-alt
Copy link

I'm not the author, but I solved the problem. The link would be helpful to you: #16 (comment) After doing this, there are no errors related to the ablation study.

I try your solution, but I still have the problem.

seriousran added a commit to seriousran/4D-Facial-Avatars that referenced this issue Sep 2, 2022
To solve gafniguy#16 gafniguy#24 gafniguy#44 issues
if ray_directions_ablation is None, skip following steps about ablation
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