Giter Club home page Giter Club logo

von's People

Contributors

junyanz avatar ztzhang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

von's Issues

Download Problem

Hello,I have trouble in downloading your pretrained models and dataset.It's too slow.And I can not open your dropbox link.Can you provide Baidu SkyDrive link or some way easy to get in Chinese Mainland?Thank you!

Training images

Running into an error when feeding data into the model

I'm trying to train the model for top view car images, so after I downloaded the training data

  • created my own dataset from Google images, replaced /data/images/car
  • updated imgs_car.txt
  • updated pose_car.npz with my own viewpoints

However, I got the error below. Are there additional steps I'm missing in creating the training data?

Traceback (most recent call last):
File "train.py", line 22, in
for i, data in enumerate(dataset):
File "/media/marcchoo/Data/marcj/Documents/VON/data/init.py", line 84, in iter
for i, data in enumerate(self.dataloader):
File "/home/marcchoo/anaconda3/envs/von/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 336, in next
return self._process_next_batch(batch)
File "/home/marcchoo/anaconda3/envs/von/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 357, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
IndexError: Traceback (most recent call last):
File "/home/marcchoo/anaconda3/envs/von/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 106, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "/home/marcchoo/anaconda3/envs/von/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 106, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "/media/marcchoo/Data/marcj/Documents/VON/data/concat_dataset.py", line 9, in getitem
return tuple(d[i] for d in self.datasets)
File "/media/marcchoo/Data/marcj/Documents/VON/data/concat_dataset.py", line 9, in
return tuple(d[i] for d in self.datasets)
File "/media/marcchoo/Data/marcj/Documents/VON/data/images_dataset.py", line 95, in getitem
return self.get_item(index)
File "/media/marcchoo/Data/marcj/Documents/VON/data/images_dataset.py", line 115, in get_item
mask = im_out[3, :, :]
IndexError: index 3 is out of bounds for dimension 0 with size 3

does it support multi-GPU training?

Hi, I found it that during trianing, mult GPU didn't work.
For example

bash ./scripts/train_shape.sh 0,1 car df 

only GPU 0 is working, the others only takes 10MB memory and 0% GPU Utility

| NVIDIA-SMI 390.67                 Driver Version: 390.67                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:05:00.0 Off |                  N/A |
| 49%   82C    P2    88W / 250W |   5849MiB / 11176MiB |    100%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:06:00.0 Off |                  N/A |
| 26%   43C    P8     9W / 250W |     10MiB / 11178MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

Thank you.

CUDA out of memory issue on training 2D Texture Network

Hi,
Thank you for the code and the detailed installation procedure.

I needed some information on the training steps for the car use case.
We have the Quadro RTX 4000 GPU with 8 GB GDDR6 GPU memory. But on running the training for 2D texture network, it quickly uses up the memory and i have CUDA out of memory issue.
I kept reducing the dataset and finally was able to give only 10 images for training.

What was the hardware that you used for training and did you do any extra config for training 2605 images for the texture network?
Also can you suggest any steps to increase dataset without hitting the GPU memory issue.
I'm using PyTorch 0.4.1 with CUDA92 within conda

Thank you

Question for changing df_voxel to .obj

In test.py, save_vox_to_obj(model.voxel.data.cpu().numpy(), 0.5 if not use_df else 0.85, obj_name). Why th parameter 'th' is 0.85 instead of 0.01 for default of ios_th.
def save_vox_to_obj(voxel, th, save_path): if len(voxel.shape) == 5: voxel_iso = voxel[0, 0, :, :, :] verts, faces, normals, values = measure.marching_cubes_lewiner(voxel_iso, th, spacing=(1 / 128, 1 / 128, 1 / 128),) save_obj(verts - 0.5, faces, save_path)
In the above usage, why verts - 0.5?
Beacuse in test_shape.py,
v, f, n, _ = measure.marching_cubes_lewiner(output, opt.ios_th, spacing=(space, space, space)) save_obj(v, f, join(shape_dir, '%04d' % idx))
I wonder the difference for two cases. Thanks!

Questions about the details about the training data.

I met some problem when try to train VON,

  1. how to generate .npz data from shapenet dataset? Which dataset are you using, the 2016 voxels data or the shapenetcore .obj data?
  2. what is the training img for training texture gan? And how you generate it?

Can you show me a easy example with sample and code? Thank you very much.
BTW, could you upload you data.tar to google drive or OneDrive? The link in your script is much too slow. Thank you very much again.

Using CPU only

I've been trying to run the pipeline (only testing, no training) using a CPU only. Was this repository intended to do so?
In the readme it says that blender is optional and I interpreted it as blender being an alternative to the custom render module based on cuda. However, blender only seems to use whatever model.sample_2d() outputs and model.sample_2d() in turn is based on the custom render module.
Thanks in advance for commenting on this!

how to construct the .npz training data?

How to change the voxel value to distance function values?
What is the distance function you are actually using?
Could you elaborate how to change the shapenet file to your training data format?

Some question in test

1.I have successed in executing bash ./scripts/figures.sh 0 with df of car and chair. But when I try with voxel, it seems does have data. Your whole data is too big to download. Can you provide with a piece of data for test? The picture is for voxel of chair. It's same for voxel of car.
image

2.In executing bash ./scripts/test_shape.sh 0with df and voxel, I did some adjustment. In test_shape.sh. I remove epoch because of test. And is --th 0.012 for --ios_th 0.012?
In test_shape.py, I also made two adjuxtment,
# net_path = join(opt.checkpoints_dir, '%s_net_G_3D.pth' % opt.epoch) #改动 net_path = '/home/ljl/myproject/VON/final_models/models_3D/chair_df_G_3D.pth',
# result_root = join(opt.checkpoints_dir, 'test_epoch_%s' % opt.epoch) #改动 result_root = '/home/ljl/myproject/VON/results/test_shape_df_chair'.
For the result, I have some questions. First, for df, the result of car has big holes in head and tail. Second, for voxel, it seems to be tattered.
image

image

I wander if I have something wrong in this.
3..In executing bash ./scripts/test_texture.sh 0with df and voxel, I met same problem for voxel just as 1. And for df, I met this and I haven't figure it out.
image

It seems a lot.Thank you for your considering.

Does von support RTX2080Ti?

I just try figure.sh with RTX 2080ti +CUDA9.0+Pytorch0.4
Error occurs RuntimeError: cuda runtime error (11) : invalid argument at /opt/conda/conda-bld/pytorch_1532582628513/work/aten/src/THC/THCGeneral.cpp:663
RTX 2080ti +CUDA8.0+Pytorch0.4
Error occurs RuntimeError: CuDNN error: CUDNN_STATUS_EXECUTION_FAILED
RTX 2080ti + CUDA10+Pytorch 1.0
Error occurs cant find module 'vtn'
I am confused that does this job support RTX-GPUS?

Where's the viewpoint code?

Hello, I can't find the usage of viewpoint code in your source code, I am not sure whether I ignore something, can you tell me about it? thank you.

No module named 'vtn'

hello,
when i ran "bash ./scripts/figures.sh 0 car df"
it occured errors:

  • GPU_IDS=0
  • CLASS=car
  • DATASET=df
    +++ dirname ./scripts/figures.sh
    ++ cd ./scripts
    ++ pwd -P
  • SCRIPTPATH=/home/pf/VON/scripts
  • ROOT_DIR=/home/pf/VON/scripts/..
  • MODEL2D_DIR=/home/pf/VON/scripts/../final_models/models_2D/car_df/latest
  • MODEL3D_DIR=/home/pf/VON/scripts/../final_models/models_3D/car_df
  • RESULTS_DIR=/home/pf/VON/scripts/../results/fig_car_df/
  • NUM_SHAPES=20
  • NUM_SAMPLES=5
  • python test.py --gpu_ids 0 --results_dir /home/pf/VON/scripts/../results/fig_car_df/ --model2D_dir /home/pf/VON/scripts/../final_models/models_2D/car_df/latest --model3D_dir /home/pf/VON/scripts/../final_models/models_3D/car_df --class_3d car --phase val --dataset_mode image_and_df --model test --n_shapes 20 --n_views 5 --reset_texture --reset_shape --suffix car_df
    ----------------- Options ---------------
    D_norm_3D: none
    G_norm_3D: batch3d
    aspect_ratio: 1.0
    batch_size: 12
    checkpoints_dir: ../../results_texture/
    class_3d: car
    color_jitter: False
    crop_align: False
    crop_size: 128
    dataroot: None
    dataset_mode: image_and_df [default: base]
    df_flipped: False
    df_sigma: 8.0
    df_th: 0.9
    display_winsize: 128
    epoch: latest
    gan_mode: lsgan
    gpu_ids: 0
    init_param: 0.02
    init_type: kaiming
    input_nc: 1
    interp_shape: False
    interp_texture: False
    ios_th: 0.01
    isTrain: False [default: None]
    load_size: 128
    max_dataset_size: inf
    model: test [default: base]
    model2D_dir: /home/pf/VON/scripts/../final_models/models_2D/car_df/latest [default: None]
    model3D_dir: /home/pf/VON/scripts/../final_models/models_3D/car_df [default: None]
    n_shapes: 20 [default: 10]
    n_views: 5 [default: 10]
    name: car_df [default: experiment_name]
    ndf: 64
    ndf_3d: 64
    nef: 64
    netD: multi
    netD_3D: D0
    netE: adaIN
    netG: resnet_cat
    netG_3D: G0
    ngf: 64
    ngf_3d: 64
    nl: relu
    no_flip: False
    no_largest: False
    norm: inst
    num_Ds: 2
    num_threads: 6
    nz_shape: 200
    nz_texture: 8
    output_nc: 3
    phase: val
    pose_align: False
    pose_type: hack
    print_grad: False
    random_shift: False
    random_view: False
    real_shape: False
    real_texture: False
    render_25d: False
    render_3d: False
    reset_shape: True [default: False]
    reset_texture: True [default: False]
    resize_or_crop: crop_real_im
    results_dir: /home/pf/VON/scripts/../results/fig_car_df/ [default: ../results/]
    seed: 0
    serial_batches: False
    show_input: False
    suffix: car_df [default: ]
    use_df: False
    use_dropout: False
    verbose: False
    voxel_res: 128
    where_add: all
    ----------------- End -------------------
    dataset [ImageAndDFDataset] was created
    enable cudnn benchmark
    initialization method [kaiming]
    loading model from /home/pf/VON/scripts/../final_models/models_3D/car_df_G_3D.pth
    initialization method [kaiming]
    loading model from /home/pf/VON/scripts/../final_models/models_2D/car_df/latest_net_G_AB.pth
    initialization method [kaiming]
    loading model from /home/pf/VON/scripts/../final_models/models_2D/car_df/latest_net_E.pth
    Traceback (most recent call last):
    File "/home/pf/VON/render_module/render_sketch.py", line 2, in
    from .vtn.vtn.functions import grid_sample3d, affine_grid3d
    File "/home/pf/VON/render_module/vtn/vtn/functions/init.py", line 2, in
    from .grid_sample3d import grid_sample3d
    File "/home/pf/VON/render_module/vtn/vtn/functions/grid_sample3d.py", line 3, in
    from .._ext import vtn_lib
    File "/home/pf/VON/render_module/vtn/vtn/_ext/vtn_lib/init.py", line 3, in
    from ._vtn_lib import lib as _lib, ffi as _ffi
    ImportError: /home/pf/VON/render_module/vtn/vtn/_ext/vtn_lib/_vtn_lib.so: undefined symbol: __cudaPopCallConfiguration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "test.py", line 19, in
model = create_model(opt)
File "/home/pf/VON/models/init.py", line 59, in create_model
instance = model(opt)
File "/home/pf/VON/models/test_model.py", line 34, in init
self.setup_DR(opt)
File "/home/pf/VON/models/base_model.py", line 159, in setup_DR
from render_module.render_sketch import VoxelRenderLayer, CroppingLayer, GetRotationMatrix, FineSizeCroppingLayer
File "/home/pf/VON/render_module/render_sketch.py", line 4, in
from vtn.vtn.functions import grid_sample3d, affine_grid3d
ModuleNotFoundError: No module named 'vtn'


i don not install render ,is this the reason?

Unable to generate results with a model

Hi guys,
I am now trying to replicate the results on RTX 2080Ti. I added -gencode arch=compute_75,code=sm_75 to the nvcc command to make it work on RTX 2080Ti. I did the bash install and downloaded the models. It goes fine upto this step. Then when I run: bash ./scripts/figures.sh 0 car df, then I get the following error:

ImportError: /home/user/Downloads/VON/render_module/vtn/vtn/_ext/vtn_lib/_vtn_lib.so: undefined symbol: __cudaRegisterFatBinaryEnd

I see that the _vtn_lib.so is created there. Could you please point me in the right direction? Thank you.

Meet bug when using multi-gpu training

Hi @ztzhang & @junyanz ,

Thanks for the great work with the great code.

I tried to use multi-GPU training recently, it seems that the training will down at the end of one epoch, as shown in the following picture
image

My script is as the following
python -u train.py --gpu_ids 0,1 --display_id 1000 --dataset_mode df --model 'shape_gan' --class_3d car --checkpoints_dir ${CHECKPOINTS_DIR} --niter 125 --niter_decay 125 --batch_size 16 --G_norm_3D inst3d --save_epoch_freq 10 --suffix {class_3d}_{model}_{dataset_mode}

My guess is that the training data has 3457 samples and 3457%16 = 1, thus at the last iteration, only one GPU got the sample while another one did not.

I am not sure whether the guess is right, so do you have any suggestions or solution to fix this bug?

No module named 'vtn.vtn._ext'

I'm trying to reproduce Generate 3d shape 2d sketch images part by

bash ./scripts/figures.sh 0 car df

below is the error

dataset [ImageAndDFDataset] was created
enable cudnn benchmark
initialization method [kaiming]
loading model from ./VON/scripts/../final_models/models_3D/car_df_G_3D.pth
initialization method [kaiming]
loading model from ./VON/scripts/../final_models/models_2D/car_df/latest_net_G_AB.pth
Traceback (most recent call last):
  File "./VON/render_module/render_sketch.py", line 2, in <module>
    from .vtn.vtn.functions import grid_sample3d, affine_grid3d
  File "./VON/render_module/vtn/vtn/functions/__init__.py", line 2, in <module>
    from .grid_sample3d import grid_sample3d
  File "./VON/render_module/vtn/vtn/functions/grid_sample3d.py", line 3, in <module>
    from .._ext import vtn_lib
ModuleNotFoundError: No module named 'render_module.vtn.vtn._ext'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./test.py", line 19, in <module>
    model = create_model(opt)
  File "./VON/models/__init__.py", line 37, in create_model
    instance.initialize(opt)
  File "./VON/models/test_model.py", line 36, in initialize
    self.setup_DR(opt)
  File "./VON/models/base_model.py", line 161, in setup_DR
    from render_module.render_sketch import VoxelRenderLayer, CroppingLayer, GetRotationMatrix, FineSizeCroppingLayer
  File "./VON/render_module/render_sketch.py", line 4, in <module>
    from vtn.vtn.functions import grid_sample3d, affine_grid3d
ModuleNotFoundError: No module named 'vtn'

from .._ext import vtn_lib

it seems that there is no such file ./render_module/vtn/vtn/_ext.py

error in BilinearSampler3D update output: no kernel image is available for execution on the device

After sucessufully compiled ./install.sh I tried to reproduceGenerate 3D shapes, 2.5D sketches, and images part by runing bash ./scripts/figures.sh 0 car df and got an error

error in BilinearSampler3D update output: no kernel image is available for execution on the device

here is my conifg:

  • GeForce RTX 2080 Ti
  • CUDA version 9.2.148
  • ubuntu version16.04 LTS
  • gcc version: 6.5.0
  • conda environemnt python 3.6 with pytorch 0.4.1

BTW I can only find gcc 6.5

./install.sh seems to be good

./install.sh
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o vtn_cuda_kernel_generic.cu.o vtn_cuda_kernel_generic.cu -x cu -Xcompiler -fPIC -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/TH -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC -I /data/zhibo/codebase/VON/render_module/vtn/vtn/src         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(114): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_kernel_generic.cu(232): warning: variable "index" was declared but never referenced

/data/zhibo/codebase/VON/render_module/vtn
Including CUDA code.
generating /tmp/tmpm4vcqi18/_vtn_lib.c
setting the current directory to '/tmp/tmpm4vcqi18'
running build_ext
building '_vtn_lib' extension
creating data
creating data/zhibo
creating data/zhibo/codebase
creating data/zhibo/codebase/VON
creating data/zhibo/codebase/VON/render_module
creating data/zhibo/codebase/VON/render_module/vtn
creating data/zhibo/codebase/VON/render_module/vtn/vtn
creating data/zhibo/codebase/VON/render_module/vtn/vtn/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/vtn/vtn/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c _vtn_lib.c -o ./_vtn_lib.o -std=c99 -fopenmp
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/vtn/vtn/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn.c -o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn.o -std=c99 -fopenmp
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/vtn/vtn/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_generic.c -o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_generic.o -std=c99 -fopenmp
gcc -pthread -shared -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed ./_vtn_lib.o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn.o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_generic.o /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_kernel_generic.cu.o -L/home/zhibo/anaconda3/envs/von/lib -lpython3.6m -o ./_vtn_lib.so
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/TH -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC -I /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61         -gencode arch=compute_70,code=sm_70
/data/zhibo/codebase/VON/render_module/calc_prob
generating /tmp/tmpvho7ta2j/_calc_prob_lib.c
setting the current directory to '/tmp/tmpvho7ta2j'
running build_ext
building '_calc_prob_lib' extension
creating data
creating data/zhibo
creating data/zhibo/codebase
creating data/zhibo/codebase/VON
creating data/zhibo/codebase/VON/render_module
creating data/zhibo/codebase/VON/render_module/calc_prob
creating data/zhibo/codebase/VON/render_module/calc_prob/calc_prob
creating data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA=True -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c _calc_prob_lib.c -o ./_calc_prob_lib.o -std=c99
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA=True -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob.c -o ./data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob.o -std=c99
gcc -pthread -shared -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed ./_calc_prob_lib.o ./data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob.o /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob_kernel.cu.o -L/home/zhibo/anaconda3/envs/von/lib -lpython3.6m -o ./_calc_prob_lib.so

here is the error

bash ./scripts/figures.sh 0 car df
+ GPU_ID=0
+ CLASS=car
+ DATASET=df
+++ dirname ./scripts/figures.sh
++ cd ./scripts
++ pwd -P
+ SCRIPTPATH=/data/zhibo/codebase/VON/scripts
+ ROOT_DIR=/data/zhibo/codebase/VON/scripts/..
+ DISPLAY_ID=1
+ MODEL2D_DIR=/data/zhibo/codebase/VON/scripts/../final_models/models_2D/car_df/latest
+ MODEL3D_DIR=/data/zhibo/codebase/VON/scripts/../final_models/models_3D/car_df
+ RESULTS_DIR=/data/zhibo/codebase/VON/scripts/../results/fig_car_df/
+ NUM_SHAPES=20
+ NUM_SAMPLES=5
+ CUDA_VISIBLE_DEVICES=0
+ python ./test.py --results_dir /data/zhibo/codebase/VON/scripts/../results/fig_car_df/ --model2D_dir /data/zhibo/codebase/VON/scripts/../final_models/models_2D/car_df/latest --model3D_dir /data/zhibo/codebase/VON/scripts/../final_models/models_3D/car_df --class_3d car --phase val --dataset_mode image_and_df --model test --n_shapes 20 --n_views 5 --reset_texture --reset_shape --suffix car_df --batch_size 1 --use_df
----------------- Options ---------------
                D_norm_3D: none
                G_norm_3D: batch3d
             aspect_ratio: 1.0
               batch_size: 1                                    [default: 12]
          checkpoints_dir: ../../results_texture/
                 class_3d: car
             color_jitter: False
               crop_align: False
                 dataroot: None
             dataset_mode: image_and_df                         [default: base]
               df_flipped: False
                 df_sigma: 8.0
                    df_th: 0.9
          display_winsize: 128
                    epoch: latest
                fine_size: 128
                 gan_mode: lsgan
                  gpu_ids: 0
               init_param: 0.02
                init_type: kaiming
                 input_nc: 1
             interp_shape: False
           interp_texture: False
                  isTrain: False                                [default: None]
                load_size: 128
         max_dataset_size: inf
                    model: test                                 [default: stage]
              model2D_dir: /data/zhibo/codebase/VON/scripts/../final_models/models_2D/car_df/latest     [default: None]
              model3D_dir: /data/zhibo/codebase/VON/scripts/../final_models/models_3D/car_df    [default: None]
                 n_shapes: 20                                   [default: 10]
                  n_views: 5                                    [default: 10]
                     name: car_df                               [default: experiment_name]
                      ndf: 64
                   ndf_3d: 64
                      nef: 64
                     netD: multi
                  netD_3D: D0
                     netE: adaIN
                     netG: resnet_cat
                  netG_3D: G0
                      ngf: 64
                   ngf_3d: 64
                       nl: relu
                  no_flip: False
               no_largest: False
                     norm: inst
                   num_Ds: 2
              num_threads: 6
                 nz_shape: 200
               nz_texture: 8
                output_nc: 3
                    phase: val
               pose_align: False
                pose_type: hack
               print_grad: False
             random_shift: False
              random_view: False
               real_shape: False
             real_texture: False
               render_25d: False
                render_3d: False
              reset_shape: True                                 [default: False]
            reset_texture: True                                 [default: False]
           resize_or_crop: crop_real_im
              results_dir: /data/zhibo/codebase/VON/scripts/../results/fig_car_df/      [default: ../results/]
                     seed: 0
           serial_batches: False
               show_input: False
                 show_rec: False
                   suffix: car_df                               [default: ]
                       th: 0.01
                   use_df: True                                 [default: False]
              use_dropout: False
                  verbose: False
                voxel_res: 128
                where_add: all
----------------- End -------------------
dataset [ImageAndDFDataset] was created
enable cudnn benchmark
initialization method [kaiming]
loading model from /data/zhibo/codebase/VON/scripts/../final_models/models_3D/car_df_G_3D.pth
initialization method [kaiming]
loading model from /data/zhibo/codebase/VON/scripts/../final_models/models_2D/car_df/latest_net_G_AB.pth
initialization method [kaiming]
loading model from /data/zhibo/codebase/VON/scripts/../final_models/models_2D/car_df/latest_net_E.pth
model [TestModel] was created
---------- Networks -------------
[G_AB] Total #parameters : 8.924 M
[G_3D] Total #parameters : 17.832 M
[E] Total #parameters : 1.718 M
-----------------------------------------------
Loading model test
creating website /data/zhibo/codebase/VON/scripts/../results/fig_car_df/car_df_views5_shape20_rFalse
  0%|                                                                                                                                                      | 0/20 [00:00<?, ?it/s]
error in BilinearSampler3D update output: no kernel image is available for execution on the device
Exception ignored in: <bound method _DataLoaderIter.__del__ of <torch.utils.data.dataloader._DataLoaderIter object at 0x7fba3b1fcfd0>>
Traceback (most recent call last):
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 399, in __del__
    self._shutdown_workers()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/data/dataloader.py", line 378, in _shutdown_workers
    self.worker_result_queue.get()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/multiprocessing/queues.py", line 337, in get
    return _ForkingPickler.loads(res)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/multiprocessing/reductions.py", line 151, in rebuild_storage_fd
    fd = df.detach()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/multiprocessing/resource_sharer.py", line 58, in detach
    return reduction.recv_handle(conn)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/multiprocessing/reduction.py", line 182, in recv_handle
    return recvfds(s, 1)[0]
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/multiprocessing/reduction.py", line 153, in recvfds
    msg, ancdata, flags, addr = sock.recvmsg(1, socket.CMSG_SPACE(bytes_size))
ConnectionResetError: [Errno 104] Connection reset by peer
Traceback (most recent call last):
  File "./test.py", line 61, in <module>
    image, depth, mask = model.sample_2d(view_id=k, extra=True)
  File "/data/zhibo/codebase/VON/models/test_model.py", line 119, in sample_2d
    self.mask, self.depth = self.get_depth(self.voxel, self.rot_mat, use_df=self.use_df)
  File "/data/zhibo/codebase/VON/models/base_model.py", line 271, in get_depth
    silhouette_orig, depth_orig = self.renderLayer(voxel, rot_mat)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/data/zhibo/codebase/VON/render_module/render_sketch.py", line 249, in forward
    voxel_rot = self.grid_sampler3d(voxel_in, voxel_rot_grid)
  File "/data/zhibo/codebase/VON/render_module/vtn/vtn/functions/grid_sample3d.py", line 62, in grid_sample3d
    return GridSampler3D.apply(input, grid)
  File "/data/zhibo/codebase/VON/render_module/vtn/vtn/functions/grid_sample3d.py", line 35, in forward
    getattr(vtn_lib, func_name)(input, grid, output)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 202, in safe_call
    result = torch._C._safe_call(*args, **kwargs)
torch.FatalError: aborting at /data/zhibo/codebase/VON/render_module/vtn/vtn/src/generic/vtn_cuda_generic.c:15

Fail to compile `./install.sh`: distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

I tried to run ./install.sh

here is my conifg:

  • GeForce RTX 2080 Ti
  • CUDA version 9.2.148
  • ubuntu version16.04 LTS
  • gcc version: 5.4.0
  • conda environemnt python 3.6 with pytorch 0.4.1

here is the error

Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o vtn_cuda_kernel_generic.cu.o vtn_cuda_kernel_generic.cu -x cu -Xcompiler -fPIC -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/TH -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC -I /data/zhibo/codebase/VON/render_module/vtn/vtn/src         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61
In file included from /usr/include/c++/5/type_traits:35:0,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/ATen/optional.h:19,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/ATen/Error.h:4,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/ATen/Allocator.h:6,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/TH/THAllocator.h:6,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h:5,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4,
                 from vtn_cuda_kernel_generic.cu:1:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
/data/zhibo/codebase/VON/render_module/vtn
Including CUDA code.
generating /tmp/tmpeiqqa8a6/_vtn_lib.c
setting the current directory to '/tmp/tmpeiqqa8a6'
running build_ext
building '_vtn_lib' extension
creating data
creating data/zhibo
creating data/zhibo/codebase
creating data/zhibo/codebase/VON
creating data/zhibo/codebase/VON/render_module
creating data/zhibo/codebase/VON/render_module/vtn
creating data/zhibo/codebase/VON/render_module/vtn/vtn
creating data/zhibo/codebase/VON/render_module/vtn/vtn/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/vtn/vtn/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c _vtn_lib.c -o ./_vtn_lib.o -std=c99 -fopenmp
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/vtn/vtn/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn.c -o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn.o -std=c99 -fopenmp
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/vtn/vtn/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_generic.c -o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_generic.o -std=c99 -fopenmp
gcc -pthread -shared -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed ./_vtn_lib.o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn.o ./data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_generic.o /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_kernel_generic.cu.o -L/home/zhibo/anaconda3/envs/von/lib -lpython3.6m -o ./_vtn_lib.so
gcc: error: /data/zhibo/codebase/VON/render_module/vtn/vtn/src/vtn_cuda_kernel_generic.cu.o: No such file or directory
Traceback (most recent call last):
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/unixccompiler.py", line 196, in link
    self.spawn(linker + ld_args)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
    target_lang=language)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/unixccompiler.py", line 198, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 52, in <module>
    ffi.build()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 189, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 111, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/api.py", line 697, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/recompiler.py", line 1520, in recompile
    compiler_verbose, debug)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/TH -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include -I /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC -I /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61         -gencode arch=compute_70,code=sm_70
In file included from /usr/include/c++/5/type_traits:35:0,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/ATen/optional.h:19,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/ATen/Error.h:4,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/ATen/Allocator.h:6,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/TH/THAllocator.h:6,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC/THCGeneral.h:5,
                 from /home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/lib/include/THC/THC.h:4,
                 from calc_prob_kernel.cu:1:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
 #error This file requires compiler and library support \
  ^
/data/zhibo/codebase/VON/render_module/calc_prob
generating /tmp/tmpti_xa_36/_calc_prob_lib.c
setting the current directory to '/tmp/tmpti_xa_36'
running build_ext
building '_calc_prob_lib' extension
creating data
creating data/zhibo
creating data/zhibo/codebase
creating data/zhibo/codebase/VON
creating data/zhibo/codebase/VON/render_module
creating data/zhibo/codebase/VON/render_module/calc_prob
creating data/zhibo/codebase/VON/render_module/calc_prob/calc_prob
creating data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA=True -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c _calc_prob_lib.c -o ./_calc_prob_lib.o -std=c99
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -m64 -fPIC -m64 -fPIC -fPIC -DWITH_CUDA=True -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src -I/home/zhibo/anaconda3/envs/von/include/python3.6m -c /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob.c -o ./data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob.o -std=c99
gcc -pthread -shared -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed -L/home/zhibo/anaconda3/envs/von/lib -Wl,-rpath=/home/zhibo/anaconda3/envs/von/lib,--no-as-needed ./_calc_prob_lib.o ./data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob.o /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob_kernel.cu.o -L/home/zhibo/anaconda3/envs/von/lib -lpython3.6m -o ./_calc_prob_lib.so
gcc: error: /data/zhibo/codebase/VON/render_module/calc_prob/calc_prob/src/calc_prob_kernel.cu.o: No such file or directory
Traceback (most recent call last):
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/unixccompiler.py", line 196, in link
    self.spawn(linker + ld_args)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
    target_lang=language)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/distutils/unixccompiler.py", line 198, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 42, in <module>
    ffi.build()
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 189, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 111, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/api.py", line 697, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/recompiler.py", line 1520, in recompile
    compiler_verbose, debug)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/zhibo/anaconda3/envs/von/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1

How can I get and view (or render) distance function grids in 3D view?

Thanks to your awesome work! Generating images from 3D is a great idea!

You demonstrated some images of distance function grids in your paper, but there seems no code doing this, sorry I'm new to 3D learning.

I‘m wondering how to get distance functions from a mesh like *.obj files, and how to render such a N x N x N distance grid in 3D view (just like your paper). Can you provide some tools or just tell me the name?

bash install has problem

Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o vtn_cuda_kernel_generic.cu.o vtn_cuda_kernel_generic.cu -x cu -Xcompiler -fPIC -std=c++11 -I /usr/local/anaconda3/lib/python3.7/site-packages/torch/lib/include/TH -I /usr/local/anaconda3/lib/python3.7/site-packages/torch/lib/include -I /usr/local/anaconda3/lib/python3.7/site-packages/torch/lib/include/THC -I /home/humaolin/papercode/VON/render_module/vtn/vtn/src -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_61,code=sm_61
vtn_cuda_kernel_generic.cu:1:10: fatal error: THC.h: No such file or directory
#include <THC.h>
^~~~~~~
compilation terminated.

Fail to compile rendering kernel.

I followed the steps in README.md, but got errors when I use this command:

bash install.sh

The errors are as follows:

gcc: error:/home/asd/VON/render_module/vtn/vtn/src/vtn_cuda_kernel_generic.cu.o:No such file or directory
Traceback (most recent call last):
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/unixccompiler.py", line 197, in link
    self.spawn(linker + ld_args)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
    target_lang=language)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/unixccompiler.py", line 199, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 52, in <module>
    ffi.build()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 189, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 111, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/api.py", line 697, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/recompiler.py", line 1520, in recompile
    compiler_verbose, debug)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1
Add -gencode to match all the GPU architectures you have.
Check 'https://en.wikipedia.org/wiki/CUDA#GPUs_supported' for list of architecture.
Check 'http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html' for GPU compilation based on architecture.
nvcc -c -o calc_prob_kernel.cu.o calc_prob_kernel.cu -x cu -Xcompiler -fPIC -I /home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/lib/include/TH -I /home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/lib/include -I /home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/lib/include/THC -I /home/asd/VON/render_module/calc_prob/calc_prob/src         -gencode arch=compute_30,code=sm_30         -gencode arch=compute_35,code=sm_35         -gencode arch=compute_52,code=sm_52         -gencode arch=compute_61,code=sm_61         -gencode arch=compute_70,code=sm_70
nvcc fatal   : Unsupported gpu architecture 'compute_61'
/home/asd/VON/render_module/calc_prob
generating /tmp/tmpje48npiy/_calc_prob_lib.c
setting the current directory to '/tmp/tmpje48npiy'
running build_ext
building '_calc_prob_lib' extension
creating home
creating home/asd
creating home/asd/VON
creating home/asd/VON/render_module
creating home/asd/VON/render_module/calc_prob
creating home/asd/VON/render_module/calc_prob/calc_prob
creating home/asd/VON/render_module/calc_prob/calc_prob/src
gcc -pthread -B /home/asd/anaconda3/envs/tang/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/home/asd/VON/render_module/calc_prob/calc_prob/src -I/home/asd/anaconda3/envs/tang/include/python3.6m -c _calc_prob_lib.c -o ./_calc_prob_lib.o -std=c99
gcc -pthread -B /home/asd/anaconda3/envs/tang/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA=True -I/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/home/asd/VON/render_module/calc_prob/calc_prob/src -I/home/asd/anaconda3/envs/tang/include/python3.6m -c /home/asd/VON/render_module/calc_prob/calc_prob/src/calc_prob.c -o ./home/asd/VON/render_module/calc_prob/calc_prob/src/calc_prob.o -std=c99
gcc -pthread -shared -B /home/asd/anaconda3/envs/tang/compiler_compat -L/home/asd/anaconda3/envs/tang/lib -Wl,-rpath=/home/asd/anaconda3/envs/tang/lib -Wl,--no-as-needed -Wl,--sysroot=/ ./_calc_prob_lib.o ./home/asd/VON/render_module/calc_prob/calc_prob/src/calc_prob.o /home/asd/VON/render_module/calc_prob/calc_prob/src/calc_prob_kernel.cu.o -o ./_calc_prob_lib.so
gcc: error:/home/asd/VON/render_module/calc_prob/calc_prob/src/calc_prob_kernel.cu.o:No such file or directory
Traceback (most recent call last):
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/unixccompiler.py", line 197, in link
    self.spawn(linker + ld_args)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/spawn.py", line 36, in spawn
    _spawn_posix(cmd, search_path, dry_run=dry_run)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
    % (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/command/build_ext.py", line 558, in build_extension
    target_lang=language)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/ccompiler.py", line 717, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/distutils/unixccompiler.py", line 199, in link
    raise LinkError(msg)
distutils.errors.LinkError: command 'gcc' failed with exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "build.py", line 42, in <module>
    ffi.build()
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 189, in build
    _build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 111, in _build_extension
    outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/api.py", line 697, in compile
    compiler_verbose=verbose, debug=debug, **kwds)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/recompiler.py", line 1520, in recompile
    compiler_verbose, debug)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "/home/asd/anaconda3/envs/tang/lib/python3.6/site-packages/cffi/ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: LinkError: command 'gcc' failed with exit status 1

running the example script

I downloaded the model using bash ./scripts/download_model.sh.

But then when I try

bash ./scripts/figures.sh 0 car df

to generate samples, I get the following output.

+ GPU_ID=0
+ CLASS=car
+ DATASET=df
+++ dirname ./scripts/figures.sh
++ cd ./scripts
++ pwd -P
+ SCRIPTPATH=/om/user/ilkery/VON/scripts
+ ROOT_DIR=/om/user/ilkery/VON/scripts/..                                                                                                                                   [72/1761]
+ DISPLAY_ID=1
+ MODEL2D_DIR=/om/user/ilkery/VON/scripts/../final_models/models_2D/car_df/latest
+ MODEL3D_DIR=/om/user/ilkery/VON/scripts/../final_models/models_3D/car_df
+ RESULTS_DIR=/om/user/ilkery/VON/scripts/../results/fig_car_df/
+ NUM_SHAPES=20
+ NUM_SAMPLES=5
+ CUDA_VISIBLE_DEVICES=0
+ python ./test.py --results_dir /om/user/ilkery/VON/scripts/../results/fig_car_df/ --model2D_dir /om/user/ilkery/VON/scripts/../final_models/models_2D/car_df/latest --model3D_dir /
om/user/ilkery/VON/scripts/../final_models/models_3D/car_df --class_3d car --phase val --dataset_mode image_and_df --model test --n_shapes 20 --n_views 5 --reset_texture --reset_sha
pe --suffix car_df --batch_size 1 --use_df
----------------- Options ---------------
                D_norm_3D: none
                G_norm_3D: batch3d
             aspect_ratio: 1.0
               batch_size: 1                                    [default: 12]
          checkpoints_dir: ../../results_texture/
                 class_3d: car
             color_jitter: False
               crop_align: False
                 dataroot: None
             dataset_mode: image_and_df                         [default: base]
               df_flipped: False
                 df_sigma: 8.0
                    df_th: 0.9
          display_winsize: 128
                    epoch: latest
                fine_size: 128
                 gan_mode: lsgan
                  gpu_ids: 0
               init_param: 0.02
                init_type: kaiming
                 input_nc: 1
             interp_shape: False
           interp_texture: False
                  isTrain: False                                [default: None]
                load_size: 128                                                                                                                                              [36/1761]
         max_dataset_size: inf
                    model: test                                 [default: stage]
              model2D_dir: /om/user/ilkery/VON/scripts/../final_models/models_2D/car_df/latest    [default: None]
              model3D_dir: /om/user/ilkery/VON/scripts/../final_models/models_3D/car_df [default: None]
                 n_shapes: 20                                   [default: 10]
                  n_views: 5                                    [default: 10]
                     name: car_df                               [default: experiment_name]
                      ndf: 64
                   ndf_3d: 64
                      nef: 64
                     netD: multi
                  netD_3D: D0
                     netE: adaIN
                     netG: resnet_cat
                  netG_3D: G0
                      ngf: 64
                   ngf_3d: 64
                       nl: relu
                  no_flip: False
               no_largest: False
                     norm: inst
                   num_Ds: 2
              num_threads: 6
                 nz_shape: 200
               nz_texture: 8
                output_nc: 3
                    phase: val
               pose_align: False
                pose_type: hack
               print_grad: False
             random_shift: False
              random_view: False
               real_shape: False
             real_texture: False
               render_25d: False
                render_3d: False
              reset_shape: True                                 [default: False]
            reset_texture: True                                 [default: False]
           resize_or_crop: crop_real_im
              results_dir: /om/user/ilkery/VON/scripts/../results/fig_car_df/   [default: ../results/]
                     seed: 0
           serial_batches: False
               show_input: False
                 show_rec: False
                   suffix: car_df                               [default: ]
                       th: 0.01
                   use_df: True                                 [default: False]
              use_dropout: False
                  verbose: False
                voxel_res: 128
                where_add: all
----------------- End -------------------
dataset [ImageAndDFDataset] was created
enable cudnn benchmark
initialization method [kaiming]
loading model from /om/user/ilkery/VON/scripts/../final_models/models_3D/car_df_G_3D.pth
Traceback (most recent call last):
  File "./test.py", line 19, in <module>
    model = create_model(opt)
  File "/om/user/ilkery/VON/models/__init__.py", line 37, in create_model
    instance.initialize(opt)
  File "/om/user/ilkery/VON/models/test_model.py", line 28, in initialize
    self.netG_3D = self.define_G_3D()
  File "/om/user/ilkery/VON/models/base_model.py", line 68, in define_G_3D
    self.load_network(netG, opt.model3D_dir + '_G_3D.pth')
  File "/om/user/ilkery/VON/models/base_model.py", line 142, in load_network
    net.module.load_state_dict(torch.load(path))
  File "/om/user/ilkery/envs/pytorch_v04/lib/python3.6/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for _netG0:
        Unexpected key(s) in state_dict: "block_0.1.num_batches_tracked", "block_1.1.num_batches_tracked", "block_2.1.num_batches_tracked", "block_3.1.num_batches_tracked", "block_4.1.num_batches_tracked".

Can't find your supplement

I can not find your supplemental material neither on the project page nor on NIPS page? Where else can I refer to?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.