autonomousvision / occupancy_networks

This repository contains the code for the paper "Occupancy Networks - Learning 3D Reconstruction in Function Space"
https://avg.is.tuebingen.mpg.de/publications/occupancy-networks
MIT License
1.51k stars 292 forks source link

AttributeError: 'Tensor' object has no attribute 'probs' #54

Closed qiaogh97 closed 4 years ago

qiaogh97 commented 4 years ago

Hello, @LMescheder @m-niemeyer ! When I run the train.py code, it always reports this error.

[Epoch 01] it=010, loss=378.7144
[Epoch 01] it=020, loss=332.2954
Visualizing
Traceback (most recent call last):
  File "train.py", line 135, in <module>
    trainer.visualize(data_vis)
  File "/home/qiaoguanhui/pycharm/occupancy_networks/im2mesh/onet/training.py", line 136, in visualize
    occ_hat = p_r.probs.view(batch_size, *shape)
AttributeError: 'Tensor' object has no attribute 'probs' 

I can't find where the 'probs' is. I am sure my anaconda environment is correctly since I can run demo and get normal result.

qiaogh97 commented 4 years ago

Sorry, that's my mistake. I used to change the code 'return p_r' to 'return c'. Tensor 'c' has no attribute 'probs', and tensor p_r has 'probs'.