Giter VIP home page Giter VIP logo

3d-r2n2's People

Contributors

andreaazzini avatar chrischoy avatar edwardsmith1884 avatar hzxie avatar praveenvvstgy 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  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

3d-r2n2's Issues

Assertion Error

Using cuDNN version 6021 on context None
Mapped name None to device cuda0: Tesla K80 (0000:00:04.0)
/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/skimage/transform/_warps.py:84: UserWarning: The default mode, 'constant', will be changed to 'reflect' in skimage 0.15.
warn("The default mode, 'constant', will be changed to 'reflect' in "
/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/tensor/nnet/conv.py:98: UserWarning: theano.tensor.nnet.conv.conv2d is deprecated. Use theano.tensor.nnet.conv2d instead.
warnings.warn("theano.tensor.nnet.conv.conv2d is deprecated."
/mnt/disks/ext/3D-R2N2/lib/layers.py:354: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'.
padding=self._padding)
/mnt/disks/ext/3D-R2N2/lib/layers.py:354: UserWarning: DEPRECATION: the 'padding' parameter is not going to exist anymore as it is going to be replaced by the parameter 'pad'.
padding=self._padding)
Traceback (most recent call last):
File "demo.py", line 89, in
main()
File "demo.py", line 71, in main
voxel_prediction, _ = solver.test_output(demo_imgs)
File "/mnt/disks/ext/3D-R2N2/lib/solver.py", line 220, in test_output
*self.net.activations])
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/function.py", line 317, in function
output_keys=output_keys)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/function_module.py", line 1841, in orig_function
fn = m.create(defaults)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/function_module.py", line 1715, in create
input_storage=input_storage_lists, storage_map=storage_map)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/link.py", line 699, in make_thunk
storage_map=storage_map)[:3]
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/vm.py", line 1084, in make_all
impl=impl))
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/scan_module/scan_op.py", line 866, in make_thunk
on_unused_input='ignore')
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/function.py", line 317, in function
output_keys=output_keys)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/pfunc.py", line 486, in pfunc
output_keys=output_keys)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/function_module.py", line 1839, in orig_function
name=name)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/compile/function_module.py", line 1519, in init
optimizer_profile = optimizer(fgraph)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/opt.py", line 99, in call
return self.optimize(fgraph)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/opt.py", line 88, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/opt.py", line 242, in apply
sub_prof = optimizer.optimize(fgraph)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/opt.py", line 88, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/opt.py", line 242, in apply
sub_prof = optimizer.optimize(fgraph)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gof/opt.py", line 88, in optimize
ret = self.apply(fgraph, *args, **kwargs)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gpuarray/opt.py", line 417, in apply
node.outputs)
File "/home/imran_salam_24/anaconda3/envs/my_env/lib/python3.6/site-packages/theano/gpuarray/opt.py", line 1496, in local_gpua_error_convop
"""

AssertionError: ('The following error happened while compiling the node', forall_inplace,gpu,scan_fn}(Shape_i{0}.0, GpuSubtensor{int64:int64:int8}.0, GpuIncSubtensor{InplaceSet;:int64:}.0, GpuIncSubtensor{InplaceSet;:int64:}.0, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, 4D)>, <GpuArrayType(float32, matrix)>, <GpuArrayType(float32, matrix)>, <GpuArrayType(float32, matrix)>, <GpuArrayType(float32, matrix)>, InplaceGpuDimShuffle{x,x,0,x,x}.0, InplaceGpuDimShuffle{x,0}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, InplaceGpuDimShuffle{x,0,x,x}.0, GpuFromHost.0, InplaceGpuDimShuffle{x,x,0,x,x}.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuReshape{4}.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuReshape{4}.0, InplaceGpuDimShuffle{x,x,0,x,x}.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuFromHost.0, GpuReshape{4}.0), '\n', '\nConvOp does not work with
the gpuarray backend.\n\nUse the new convolution interface to have GPU convolution working:\ntheano.tensor.nnet.conv2d()\n')

My theanorc file is ;
[global]
floatX = float32
device = cuda0

Rendering script

Would it be possible to give me access to the rendering script used?

memory error during training function compiling

Hi,
I am running res_gru_net.sh with a Geforce 1080Ti. I got more than one card so I can run the process on a card that is not used for Xorg. At the beginning of the procedure only 4 Mb out of the 8 Gb are used. But I then get this error after a few minutes of compiling:
Compiling training function
Error allocating 320864256 bytes of device memory (out of memory). Driver report 138870784 bytes free and 8507555840 bytes total
I killed all python processes and ran the script again but that did not help.
Any ideas of why the whole memory gets used?

Out of memory error

When I ran the program on Titan X GPU, I got an error message saying Error allocating 33554432 bytes of device memory (out of memory). Driver report 21364736 bytes free and 11715084288 bytes total.

Here's the output of nvidia-smi before running the program:

Sat Dec 30 14:25:46 2017       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 384.90                 Driver Version: 384.90                    |
|-------------------------------+----------------------+----------------------+
| 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 TIT...  Off  | 00000000:01:00.0  On |                  N/A |
| 22%   55C    P8    17W / 250W |      1MiB / 12205MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

Could not broadcast input array from shape (1,4,127,127) into shape (1,3,127,127)

Hi,

Thank you for making your code available, it's really cool!

I am having problems testing it on some of my images though. For starters I am trying a single RGB image that's 127x127 pixels, and I modified demo.py to only expect one input image:

for i in range(1):
    im = Image.open('imgs/%d.png' % i)
  ....

But when I run "python demo.py prediction.obj", I get the error

loading network parameters from output/ResidualGRUNet/default_model/weights.npy
Compiling testing function
Traceback (most recent call last):
File "theano/scan_module/scan_perform.pyx", line 397, in        theano.scan_module.scan_perform.perform (/Users/<username>/.theano/compiledir_Darwin-15.6.0-   x86_64-i386-64bit-i386-3.6.2-64/scan_perform/mod.cpp:4490)
ValueError: could not broadcast input array from shape (1,4,127,127) into shape (1,3,127,127)

I tried grayscaling the input image but got a similar error: "could not broadcast input array from shape (1,2,127,127) into shape (1,3,127,127)"

Not sure what's wrong with my input image shape? Could you please help?

Compiling the test function for more than 3 days

I use Cuda8 and theano0.9. So the device=cuda0. And comment out the deprecated "sandbox.cuda".
The main.py is able to run but runs for more than 3 days now.
It's possible that GPU is not involved.
How to enable GPU?

stride

Hello, what's the value of stride in the encoder and decoder layers? such as self.conv1a = Conv2d(input_shape[1], n_convfilter[0], 7, padding=3), what's the value of stride in this layer?

Object arrays cannot be loaded when allow_pickle=False

When trying to run demo I get:

 └─ ▶python demo.py prediction.obj
ERROR (theano.gpuarray): pygpu was configured but could not be imported or is too old (version 0.7 or higher required)
NoneType: None
/home/zangetsu/proj/prometheus-core/demo/3D-R2N2/lib/layers.py:353: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'.
  padding=self._padding)
/home/zangetsu/proj/prometheus-core/demo/3D-R2N2/lib/layers.py:353: UserWarning: DEPRECATION: the 'padding' parameter is not going to exist anymore as it is going to be replaced by the parameter 'pad'.
  padding=self._padding)
loading network parameters from output/ResidualGRUNet/default_model/weights.npy
Traceback (most recent call last):
  File "demo.py", line 84, in <module>
    main()
  File "demo.py", line 62, in main
    net.load(DEFAULT_WEIGHTS)                        # load downloaded weights
  File "/home/zangetsu/proj/prometheus-core/demo/3D-R2N2/models/net.py", line 71, in load
    params_cpu_file = np.load(filename)
  File "/home/zangetsu/proj/prometheus-core/demo/3D-R2N2/venv/lib/python3.6/site-packages/numpy/lib/npyio.py", line 447, in load
    pickle_kwargs=pickle_kwargs)
  File "/home/zangetsu/proj/prometheus-core/demo/3D-R2N2/venv/lib/python3.6/site-packages/numpy/lib/format.py", line 696, in read_array
    raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
(venv)

This error is realted to numpy > 1.16.1 (this version works)

Datasets and Pre-trained model is not available

The links for datasets and pre-trained model are put within the domain of Standford University. Outside people without login username and password cannot access them. Could you please put them in open places?

TypeError: Outputs must be theano Variable or Out instances. Received [Subtensor{int64::}.0] of type <class 'list'>

Hi,

I am meeting the following problem, and whatever i try to use the different versions beyond python-3.5.1 like you said before in the last issue , or run by the version of PYTHON_CONFIGURE_OPTS="--enable-shared", it still doesn't work :(

Traceback (most recent call last):
  File "demo.py", line 84, in <module>
    main()
  File "demo.py", line 66, in main
    voxel_prediction, _ = solver.test_output(demo_imgs)
  File "/home/wenyangming/3D-R2N2/lib/solver.py", line 218, in test_output
    self.net.activations])
  File "/home/wenyangming/.pyenv/versions/env3_5_1/lib/python3.5/site-packages/theano/compile/function.py", line 320, in function
    output_keys=output_keys)
  File "/home/wenyangming/.pyenv/versions/env3_5_1/lib/python3.5/site-packages/theano/compile/pfunc.py", line 442, in pfunc
    no_default_updates=no_default_updates)
  File "/home/wenyangming/.pyenv/versions/env3_5_1/lib/python3.5/site-packages/theano/compile/pfunc.py", line 227, in rebuild_collect_shared
    ' of type ' + str(type(v)))
TypeError: Outputs must be theano Variable or Out instances. Received [Subtensor{int64::}.0] of type <class 'list'>
****

Did you have some suggestions for this problem?
Thanks a lot and looking forward to your response.

What's the specific conda environment?

When I complied with Theano=1.0.3, Python=3.6, it warned that the GPU-backend was too old...
Then I downgraded Theano to 0.7.0 with numpy<1.10, and it finally conflicted with Python=3.6.
So could please show me your conda package list?
versions of Python Theano Numpy pygpu etc..

compilation terminated

@jgwak @liujiaxing
Hi,I was trying to reproduce this experiment,and I follow the given instructions. My compilation environment is Python3.5.3. However,I meet the same problem that Liujiaxing met .
Could you give me some help or any suggestions? Thanks very much.

`Problem occurred during compilation with the command line below:
/usr/bin/g++ -shared -g -march=ivybridge -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=3072 -mtune=ivybridge -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -I/home/wj/3D-R2N2/py3/include/python3.5m -I/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof -L/usr/lib -fvisibility=hidden -o /home/wj/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-17.04-zesty-x86_64-3.5.3-64/lazylinker_ext/lazylinker_ext.so /home/wj/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-17.04-zesty-x86_64-3.5.3-64/lazylinker_ext/mod.cpp -lpython3.5m
/home/wj/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-17.04-zesty-x86_64-3.5.3-64/lazylinker_ext/mod.cpp:1:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.

Traceback (most recent call last):
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 75, in
raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 92, in
raise ImportError()
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "demo.py", line 17, in
from models import load_model
File "/home/wj/3D-R2N2/models/init.py", line 1, in
from models.gru_net import GRUNet
File "/home/wj/3D-R2N2/models/gru_net.py", line 4, in
import theano
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/init.py", line 66, in
from theano.compile import (
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/init.py", line 10, in
from theano.compile.function_module import *
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/function_module.py", line 21, in
import theano.compile.mode
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/mode.py", line 10, in
import theano.gof.vm
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/vm.py", line 662, in
from . import lazylinker_c
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 127, in
preargs=args)
File "/home/wj/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cmodule.py", line 2316, in compile_str
(status, compile_stderr.replace('\n', '. ')))
Exception: Compilation failed (return status=1): /home/wj/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-17.04-zesty-x86_64-3.5.3-64/lazylinker_ext/mod.cpp:1:20: fatal error: Python.h: No such file or directory. #include <Python.h>. `

Render Script missing parameters

Can you please update you config.py as well as the blender_renderer.py.
I'm trying to reconstruct your methods to generate the 2D images from different viewpoints.

RENDERING.BLENDER_TMP_DIR and other parameters are missing.

I initialized them with a custom directory, however creating the temporary file does not work either.

        with TemporaryFile(mode = "w+") as f, stdout_redirected(f):
            rendering, alpha = renderer.render(load_model=True,
                clear_model=True, image_path=image_path)

I would appreciate it.

NotImplementedError

Hi,
Sorry to bother you, I got this error while running the program:NotImplementedError: The image and the kernel must have the same type.inputs(float32), kerns(float64)

Here is the detailed description of the error.
Traceback (most recent call last):
File "demo.py", line 84, in
main()
File "demo.py", line 61, in main
net = NetClass(compute_grad=False) # instantiate a network
File "/home/ouc/zhanghaoxu/3D-R2N2/models/net.py", line 37, in init
self.setup()
File "/home/ouc/zhanghaoxu/3D-R2N2/models/net.py", line 40, in setup
self.network_definition()
File "/home/ouc/zhanghaoxu/3D-R2N2/models/res_gru_net.py", line 160, in network_definition
dtype=theano.config.floatX)])
File "/home/ouc/zhanghaoxu/3D-R2N2/py3/lib/python3.6/site-packages/theano/scan_module/scan.py", line 773, in scan
condition, outputs, updates = scan_utils.get_updates_and_outputs(fn(*args))
File "/home/ouc/zhanghaoxu/3D-R2N2/models/res_gru_net.py", line 153, in recurrence
return gru_out_.output, update_gate_.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 225, in set_output
self._output = self._prev_layer.output * self._mult_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 657, in set_output
self._output = sigmoid(self._prev_layer.output)
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 504, in set_output
tensor.dot(self._fc_layer.output, self.Wx.val), self._output_shape)
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 159, in set_output
self._output = tensor.dot(self._prev_layer.output, self.W.val)
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 236, in set_output
self._prev_layer.output.flatten(2) # flatten from the second dim
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 351, in set_output
input=self._prev_layer.output,
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 351, in set_output
input=self._prev_layer.output,
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 319, in set_output
padded_input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 351, in set_output
input=self._prev_layer.output,
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 313, in set_output
self._prev_layer.output)
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 313, in set_output
self._prev_layer.output)
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 351, in set_output
input=self._prev_layer.output,
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 319, in set_output
padded_input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 351, in set_output
input=self._prev_layer.output,
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 319, in set_output
padded_input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 351, in set_output
input=self._prev_layer.output,
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 313, in set_output
self._prev_layer.output)
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 129, in output
self.set_output()
File "/home/ouc/zhanghaoxu/3D-R2N2/lib/layers.py", line 328, in set_output
border_mode='valid')
File "/home/ouc/zhanghaoxu/3D-R2N2/py3/lib/python3.6/site-packages/theano/tensor/nnet/conv.py", line 156, in conv2d
return op(input, filters)
File "/home/ouc/zhanghaoxu/3D-R2N2/py3/lib/python3.6/site-packages/theano/gof/op.py", line 615, in call
node = self.make_node(*inputs, **kwargs)
File "/home/ouc/zhanghaoxu/3D-R2N2/py3/lib/python3.6/site-packages/theano/tensor/nnet/conv.py", line 658, in make_node
"inputs(%s), kerns(%s)" % (_inputs.dtype, _kerns.dtype))
NotImplementedError: The image and the kernel must have the same type.inputs(float32), kerns(float64)

Data Loading & Memory Issue

Hi,

I have been testing the R2N2 on my custom dataset. I have got a few memory allocation errors on a 12GB Titan X. It appears as though the whole of the dataset gets loaded into the GPU memory and is then split into batches. Can you confirm if this is the case? As I am new to Theano, I don't see it being done explicitly, hence, it is just an intuition. If not, what could be the other causes for a memory allocation issue with this architecture? I have full access to the 12GB of GPU memory with 64 GB of RAM.
As I am using a batch size of 5, ideally, I shouldn't be facing any issues, because, as per the paper, it has been trained with a batch size of 24.

Thanks.

P.S : Link to the error: https://pastebin.com/FJy11p3s

Out of memory? GTX 780M - 17.04

Hey,

Trying to train you cool project with new images.

So I tried the example to train, but got these errors.

Error allocating 33554432 bytes of device memory (out of memory). Driver report 17367040 bytes free and 4231200768 bytes total 
Wait until the dataprocesses to end
Signal processes
Traceback (most recent call last):
  File "/home/quinten/Documents/3D-R2N2/lib/train_net.py", line 21, in func_wrapper
    return func(*args, **kwargs)
  File "/home/quinten/Documents/3D-R2N2/lib/train_net.py", line 38, in train_net
    net = NetClass()
  File "/home/quinten/Documents/3D-R2N2/models/net.py", line 37, in __init__
    self.setup()
  File "/home/quinten/Documents/3D-R2N2/models/net.py", line 40, in setup
    self.network_definition()
  File "/home/quinten/Documents/3D-R2N2/models/res_gru_net.py", line 70, in network_definition
    t_x_s_update = FCConv3DLayer(prev_s, fc7, (n_deconvfilter[0], n_deconvfilter[0], 3, 3, 3))
  File "/home/quinten/Documents/3D-R2N2/lib/layers.py", line 478, in __init__
    fan_out=self._output_shape[2])
  File "/home/quinten/Documents/3D-R2N2/lib/layers.py", line 74, in __init__
    self.val = theano.shared(value=self.np_values)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/sharedvalue.py", line 268, in shared
    allow_downcast=allow_downcast, **kwargs)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/sandbox/cuda/var.py", line 188, in float32_shared_constructor
    deviceval = type_support_filter(value, type.broadcastable, False, None)
MemoryError: ('Error allocating 33554432 bytes of device memory (out of memory).', "you might consider using 'theano.shared(..., borrow=True)'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 118, in <module>
    main()
  File "main.py", line 109, in main
    train_net()
  File "/home/quinten/Documents/3D-R2N2/lib/train_net.py", line 24, in func_wrapper
    kill_processes(train_queue, train_processes)
  File "/home/quinten/Documents/3D-R2N2/lib/data_process.py", line 178, in kill_processes
    for p in processes:
TypeError: 'NoneType' object is not iterable
[INFO/MainProcess] process shutting down

I got a GTX 780M shouldn't this be enough to train the samples?

More of the same.

/home/quinten/Documents/3D-R2N2/lib/layers.py:354: UserWarning: DEPRECATION: the 'ds' parameter is not going to exist anymore as it is going to be replaced by the parameter 'ws'.
  padding=self._padding)
/home/quinten/Documents/3D-R2N2/lib/layers.py:354: UserWarning: DEPRECATION: the 'padding' parameter is not going to exist anymore as it is going to be replaced by the parameter 'pad'.
  padding=self._padding)
lib/data_io.py: model paths from ./experiments/dataset/shapenet_1000.json
[INFO/ReconstructionDataProcess-1] child process calling self.run()
lib/data_io.py: model paths from ./experiments/dataset/shapenet_1000.json
Set the learning rate to 0.000100.
[INFO/ReconstructionDataProcess-2] child process calling self.run()
Compiling training function
2017-11-19 10:48:51.435496 Iter: 0 Loss: 0.407328
Compiling testing function
Problem occurred during compilation with the command line below:
/usr/bin/g++ -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=haswell -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/numpy/core/include -I/usr/include/python3.5m -I/home/quinten/Documents/3D-R2N2/py3/include/python3.5m -I/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof -L/usr/lib -fvisibility=hidden -o /home/quinten/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-17.04-zesty-x86_64-3.5.3-64/tmpvcuds4gb/m9124b60ae7623786b4d02a7f8ac06738.so /home/quinten/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-17.04-zesty-x86_64-3.5.3-64/tmpvcuds4gb/mod.cpp -lpython3.5m
ERROR (theano.gof.cmodule): [Errno 12] Cannot allocate memory
Wait until the dataprocesses to end
Signal processes
Empty queue
kill processes
Signal processes
Empty queue
kill processes
Traceback (most recent call last):
  File "main.py", line 118, in <module>
    main()
  File "main.py", line 109, in main
    train_net()
  File "/home/quinten/Documents/3D-R2N2/lib/train_net.py", line 21, in func_wrapper
    return func(*args, **kwargs)
  File "/home/quinten/Documents/3D-R2N2/lib/train_net.py", line 71, in train_net
    solver.train(train_queue, val_queue)
  File "/home/quinten/Documents/3D-R2N2/lib/solver.py", line 170, in train
    _, val_loss, _ = self.test_output(batch_img, batch_voxel)
  File "/home/quinten/Documents/3D-R2N2/lib/solver.py", line 218, in test_output
    *self.net.activations])
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/function.py", line 326, in function
    output_keys=output_keys)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/pfunc.py", line 486, in pfunc
    output_keys=output_keys)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/function_module.py", line 1795, in orig_function
    defaults)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/function_module.py", line 1661, in create
    input_storage=input_storage_lists, storage_map=storage_map)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/link.py", line 699, in make_thunk
    storage_map=storage_map)[:3]
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/vm.py", line 1047, in make_all
    impl=impl))
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/op.py", line 935, in make_thunk
    no_recycling)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/op.py", line 839, in make_c_thunk
    output_storage=node_output_storage)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cc.py", line 1190, in make_thunk
    keep_lock=keep_lock)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cc.py", line 1131, in __compile__
    keep_lock=keep_lock)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cc.py", line 1586, in cthunk_factory
    key=key, lnk=self, keep_lock=keep_lock)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cmodule.py", line 1159, in module_from_key
    module = lnk.compile_cmodule(location)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cc.py", line 1489, in compile_cmodule
    preargs=preargs)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/gof/cmodule.py", line 2294, in compile_str
    p_out = output_subprocess_Popen(cmd)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/misc/windows.py", line 77, in output_subprocess_Popen
    p = subprocess_Popen(command, **params)
  File "/home/quinten/Documents/3D-R2N2/py3/lib/python3.5/site-packages/theano/misc/windows.py", line 43, in subprocess_Popen
    proc = subprocess.Popen(command, startupinfo=startupinfo, **params)
  File "/usr/lib/python3.5/subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1221, in _execute_child
    restore_signals, start_new_session, preexec_fn)
OSError: [Errno 12] Cannot allocate memory
[INFO/MainProcess] process shutting down

ResidualGRUNet TEST

Hi, I use Ubuntu 16.04 to implement the project and get a good result. And ,When I training the network with the function train_net(), it get a normal result. But ,When I test the network with the function test_net(),I get all of results of mAP are 0. Is it right, and should I change something in your scripts?
Thanks for your answer!

error: MemoryError

Hello, authors. I've got one problem when I'm training the sample dataset.
It seems like a problem about Theano. Here is the error.

Compiling training function
Error allocating 641728512 bytes of device memory (out of memory). Driver report 138280960 bytes free and 11713708032 bytes total
Wait until the dataprocesses to end
Signal processes
Empty queue
kill processes
Signal processes
Empty queue
kill processes
Traceback (most recent call last):
File "/home/kealen/software/3D-R2N2/py3/lib/python3.5/site-packages/theano/compile/function_module.py", line 884, in call
self.fn() if output_subset is None else
MemoryError: Error allocating 641728512 bytes of device memory (out of memory).

Using gpu device 1: GeForce GTX 1080 Ti (CNMeM is disabled, cuDNN 5110)
I use GPU to train the dataset. I don't know where the problem happens. Thanks in advance !

final output dimension

Hi,

I found out in your code and your paper as well that the final output of the network is [batch_size, n_vox, 2, n_vox, n_vox]. Why would you need 2 output channel?

Cheers

Use own images set to create voxelized shape

How can I use a set of own images to create a new (no example based) voxel shape.

I want to use pots (images I have from them to make a 3D voxel shape)

The instruction show only the learning aspect and not how to use the code on new images. Or I'm not fully understanding the shapenet part.

UPDATE

Changed the demo.py code a bit and put some pictures in the imgs directory.

When running python demo.py newobject.obj

I got this error.

Traceback (most recent call last):
  File "demo.py", line 84, in <module>
    main()
  File "demo.py", line 52, in main
    demo_imgs = load_demo_images()
  File "demo.py", line 43, in load_demo_images
    return np.array(ims)
ValueError: could not broadcast input array from shape (3,300,300) into shape (3)

I have no idea what this means.

Tried resizing the images to a smaller width and length but that still gives me the same error.

No such file or directory: 'curl'

Sorry to bother you, I'm new to this, when I run the demo.py, I got this problem, may you please tell me how to fix it ?thank you

Using gpu device 0: GeForce GTX 1050 Ti (CNMeM is disabled, cuDNN 6021)
/home/tony/.local/lib/python3.5/site-packages/theano/sandbox/cuda/init.py:600: UserWarning: Your cuDNN version is more recent than the one Theano officially supports. If you see any problems, try updating Theano or downgrading cuDNN to version 5.
warnings.warn(warn)
Downloading a pretrained model
Traceback (most recent call last):
File "demo.py", line 84, in
main()
File "demo.py", line 55, in main
download_model(DEFAULT_WEIGHTS)
File "demo.py", line 34, in download_model
'--create-dirs', '-o', fn])
File "/usr/lib/python3.5/subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.5/subprocess.py", line 947, in init
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'curl'

Execution Errors on Custom Images (both same and different size)

While experimenting a little bit I faced this exception after about 1 minute of execution on there custom 3 images (resolution 640 x 480), I am on Gentoo system with Nvidia 8 stack, latest theano stack 0.9.0:

zangetsu@ares ~/proj/neural-networks/3D-R2N2 $ python demo.py prediction.obj 
Using gpu device 0: GeForce GTX 960M (CNMeM is disabled, cuDNN 5110)
/usr/lib64/python3.5/site-packages/theano/sandbox/cuda/__init__.py:600: UserWarning: Your cuDNN version is more recent than the one Theano officially supports. If you see any problems, try updating Theano or downgrading cuDNN to version 5.
  warnings.warn(warn)
loading network parameters from output/ResidualGRUNet/default_model/weights.npy
Compiling testing function
Traceback (most recent call last):
  File "theano/scan_module/scan_perform.pyx", line 397, in theano.scan_module.scan_perform.perform (/home/zangetsu/.theano/compiledir_Linux-4.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3-Intel_R_Core_TM_i7-6700HQ_CPU_@_2.60GHz-3.5.3-64/scan_perform/mod.cpp:4193)
ValueError: CudaNdarray_CopyFromCudaNdarray: need same dimensions for dim 1, destination=3, source=4

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.5/site-packages/theano/compile/function_module.py", line 859, in __call__
    outputs = self.fn()
  File "/usr/lib64/python3.5/site-packages/theano/scan_module/scan_op.py", line 951, in rval
    r = p(n, [x[0] for x in i], o)
  File "/usr/lib64/python3.5/site-packages/theano/scan_module/scan_op.py", line 940, in <lambda>
    self, node)
  File "theano/scan_module/scan_perform.pyx", line 405, in theano.scan_module.scan_perform.perform (/home/zangetsu/.theano/compiledir_Linux-4.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3-Intel_R_Core_TM_i7-6700HQ_CPU_@_2.60GHz-3.5.3-64/scan_perform/mod.cpp:4316)
  File "/usr/lib64/python3.5/site-packages/theano/gof/link.py", line 314, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/usr/lib64/python3.5/site-packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "theano/scan_module/scan_perform.pyx", line 397, in theano.scan_module.scan_perform.perform (/home/zangetsu/.theano/compiledir_Linux-4.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3-Intel_R_Core_TM_i7-6700HQ_CPU_@_2.60GHz-3.5.3-64/scan_perform/mod.cpp:4193)
ValueError: CudaNdarray_CopyFromCudaNdarray: need same dimensions for dim 1, destination=3, source=4
Apply node that caused the error: GpuIncSubtensor{Set;::, ::, int64:int64:, int64:int64:}(CudaNdarrayConstant{[[[[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   ..., 
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]]

  [[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   ..., 
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]]

  [[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   ..., 
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]]]]}, Rebroadcast{1}.0, Constant{3}, Constant{130}, Constant{3}, Constant{130})
Toposort index: 116
Inputs types: [CudaNdarrayType(float32, (True, False, False, False)), CudaNdarrayType(float32, (True, False, False, False)), Scalar(int64), Scalar(int64), Scalar(int64), Scalar(int64)]
Inputs shapes: [(1, 3, 133, 133), (1, 4, 480, 640), (), (), (), ()]
Inputs strides: [(0, 17689, 133, 1), (0, 307200, 640, 1), (), (), (), ()]
Inputs values: ['not shown', 'not shown', 3, 130, 3, 130]
Outputs clients: [[GpuContiguous(GpuIncSubtensor{Set;::, ::, int64:int64:, int64:int64:}.0)]]

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "demo.py", line 84, in <module>
    main()
  File "demo.py", line 66, in main
    voxel_prediction, _ = solver.test_output(demo_imgs)
  File "/home/zangetsu/proj/neural-networks/3D-R2N2/lib/solver.py", line 232, in test_output
    results = self._test_output(x, y_val)
  File "/usr/lib64/python3.5/site-packages/theano/compile/function_module.py", line 871, in __call__
    storage_map=getattr(self.fn, 'storage_map', None))
  File "/usr/lib64/python3.5/site-packages/theano/gof/link.py", line 314, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/usr/lib64/python3.5/site-packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/usr/lib64/python3.5/site-packages/theano/compile/function_module.py", line 859, in __call__
    outputs = self.fn()
  File "/usr/lib64/python3.5/site-packages/theano/scan_module/scan_op.py", line 951, in rval
    r = p(n, [x[0] for x in i], o)
  File "/usr/lib64/python3.5/site-packages/theano/scan_module/scan_op.py", line 940, in <lambda>
    self, node)
  File "theano/scan_module/scan_perform.pyx", line 405, in theano.scan_module.scan_perform.perform (/home/zangetsu/.theano/compiledir_Linux-4.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3-Intel_R_Core_TM_i7-6700HQ_CPU_@_2.60GHz-3.5.3-64/scan_perform/mod.cpp:4316)
  File "/usr/lib64/python3.5/site-packages/theano/gof/link.py", line 314, in raise_with_op
    reraise(exc_type, exc_value, exc_trace)
  File "/usr/lib64/python3.5/site-packages/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "theano/scan_module/scan_perform.pyx", line 397, in theano.scan_module.scan_perform.perform (/home/zangetsu/.theano/compiledir_Linux-4.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.3-Intel_R_Core_TM_i7-6700HQ_CPU_@_2.60GHz-3.5.3-64/scan_perform/mod.cpp:4193)
ValueError: CudaNdarray_CopyFromCudaNdarray: need same dimensions for dim 1, destination=3, source=4
Apply node that caused the error: GpuIncSubtensor{Set;::, ::, int64:int64:, int64:int64:}(CudaNdarrayConstant{[[[[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   ..., 
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]]

  [[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   ..., 
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]]

  [[ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   ..., 
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]
   [ 0.  0.  0. ...,  0.  0.  0.]]]]}, Rebroadcast{1}.0, Constant{3}, Constant{130}, Constant{3}, Constant{130})
Toposort index: 116
Inputs types: [CudaNdarrayType(float32, (True, False, False, False)), CudaNdarrayType(float32, (True, False, False, False)), Scalar(int64), Scalar(int64), Scalar(int64), Scalar(int64)]
Inputs shapes: [(1, 3, 133, 133), (1, 4, 480, 640), (), (), (), ()]
Inputs strides: [(0, 17689, 133, 1), (0, 307200, 640, 1), (), (), (), ()]
Inputs values: ['not shown', 'not shown', 3, 130, 3, 130]
Outputs clients: [[GpuContiguous(GpuIncSubtensor{Set;::, ::, int64:int64:, int64:int64:}.0)]]

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.
Apply node that caused the error: forall_inplace,gpu,scan_fn}(Shape_i{0}.0, GpuSubtensor{int64:int64:int8}.0, GpuIncSubtensor{InplaceSet;:int64:}.0, GpuIncSubtensor{InplaceSet;:int64:}.0, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, 4D)>, <CudaNdarrayType(float32, matrix)>, <CudaNdarrayType(float32, matrix)>, <CudaNdarrayType(float32, matrix)>, <CudaNdarrayType(float32, matrix)>, GpuDimShuffle{x,x,0,x,x}.0, GpuDimShuffle{x,0}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,0,x,x}.0, GpuDimShuffle{x,x,0,x,x}.0, GpuDimShuffle{x,x,0,x,x}.0, Shape_i{4}.0, Shape_i{3}.0, Shape_i{1}.0, Shape_i{0}.0, Shape_i{4}.0, Shape_i{3}.0, Shape_i{1}.0, Shape_i{0}.0, Shape_i{4}.0, Shape_i{3}.0, Shape_i{1}.0, Shape_i{0}.0, GpuReshape{4}.0, GpuReshape{4}.0, GpuReshape{4}.0)
Toposort index: 348
Inputs types: [TensorType(int64, scalar), CudaNdarrayType(float32, 5D), CudaNdarrayType(float32, (False, True, False, False, False, False)), CudaNdarrayType(float32, (False, True, False, False, False, False)), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, matrix), CudaNdarrayType(float32, (True, True, False, True, True)), CudaNdarrayType(float32, row), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, False, True, True)), CudaNdarrayType(float32, (True, True, False, True, True)), CudaNdarrayType(float32, (True, True, False, True, True)), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), TensorType(int64, scalar), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D)]
Inputs shapes: [(), (3, 1, 4, 480, 640), (2, 1, 4, 128, 4, 4), (3, 1, 4, 128, 4, 4), (96, 3, 7, 7), (96, 96, 3, 3), (128, 96, 1, 1), (128, 96, 3, 3), (128, 128, 3, 3), (256, 128, 1, 1), (256, 128, 3, 3), (256, 256, 3, 3), (256, 256, 3, 3), (256, 256, 3, 3), (256, 256, 1, 1), (256, 256, 3, 3), (256, 256, 3, 3), (256, 256, 3, 3), (256, 256, 3, 3), (2304, 1024), (1024, 8192), (1024, 8192), (1024, 8192), (1, 1, 128, 1, 1), (1, 1024), (1, 256, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 128, 1, 1), (1, 128, 1, 1), (1, 96, 1, 1), (1, 96, 1, 1), (1, 128, 1, 1), (1, 256, 1, 1), (1, 256, 1, 1), (1, 1, 128, 1, 1), (1, 1, 128, 1, 1), (), (), (), (), (), (), (), (), (), (), (), (), (384, 128, 3, 3), (384, 128, 3, 3), (384, 128, 3, 3)]
Inputs strides: [(), (1228800, 0, 307200, 640, 1), (8192, 0, 2048, 16, 4, 1), (8192, 0, 2048, 16, 4, 1), (147, 49, 7, 1), (864, 9, 3, 1), (96, 1, 0, 0), (864, 9, 3, 1), (1152, 9, 3, 1), (128, 1, 0, 0), (1152, 9, 3, 1), (2304, 9, 3, 1), (2304, 9, 3, 1), (2304, 9, 3, 1), (256, 1, 0, 0), (2304, 9, 3, 1), (2304, 9, 3, 1), (2304, 9, 3, 1), (2304, 9, 3, 1), (1024, 1), (8192, 1), (8192, 1), (8192, 1), (0, 0, 1, 0, 0), (0, 1), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0, 0), (0, 0, 1, 0, 0), (), (), (), (), (), (), (), (), (), (), (), (), (1152, 9, 3, 1), (1152, 9, 3, 1), (1152, 9, 3, 1)]
Inputs values: [array(3), 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', 'not shown', array(3), array(3), array(3), array(128), array(3), array(3), array(3), array(128), array(3), array(3), array(3), array(128), 'not shown', 'not shown', 'not shown']
Outputs clients: [[GpuSubtensor{int64}(forall_inplace,gpu,scan_fn}.0, ScalarFromTensor.0)], [GpuSubtensor{int64:int64:int8}(forall_inplace,gpu,scan_fn}.1, ScalarFromTensor.0, ScalarFromTensor.0, Constant{1})]]

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.
HINT: Use the Theano flag 'exception_verbosity=high' for a debugprint and storage map footprint of this apply node.

Here is full trace as per HINTs:
https://pastebin.com/yh2eBg81

I converted images to 127x127 but that didn't help.

nvcc return status 2

I also got another error message on another machine: Exception: ('The following error happened while compiling the node', GpuDnnConvDesc{border_mode='valid', subsample=(1, 1), conv_mode='conv', precision='float32'}(TensorConstant{[816 32 34 34]}, MakeVector{dtype='int64'}.0), '\n', 'nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 -arch=sm_61 -m64 -Xcompiler -fno-math-errno,-Wno-unused-label,-Wno-unused-variable,-Wno-write-strings,-DCUDA_NDARRAY_CUH=mc72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,-fPIC,-fvisibility=hidden -Xlinker -rpath,/home/hzxie/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-16.04-xenial-x86_64-3.5.2-64/cuda_ndarray -I/usr/local/lib/python3.5/dist-packages/theano/sandbox/cuda -I/opt/cuda/include -I/usr/local/lib/python3.5/dist-packages/numpy/core/include -I/usr/include/python3.5m -I/usr/local/lib/python3.5/dist-packages/theano/gof -o /home/hzxie/.theano/compiledir_Linux-4.10--generic-x86_64-with-Ubuntu-16.04-xenial-x86_64-3.5.2-64/tmpdwc9ej0h/mce178ed9c0cdab911c3a009d42a487fa.so mod.cu -L/usr/lib -lcudnn -lpython3.5m -lcudart', "[GpuDnnConvDesc{border_mode='valid', subsample=(1, 1), conv_mode='conv', precision='float32'}(TensorConstant{[816 32 34 34]}, <TensorType(int64, vector)>)]")

Can you tell me how to solve it?
Thank you very much.

Compiling testing function doesn't work

Dear author:
sorry to bother you. Here is my question. After I change the training dataset, the training process cannot operate successfully. It always loops in "Compiling testing function", as follows:

lib/data_io.py: model paths from ./experiments/dataset/shapenet_1000.json
lib/data_io.py: model paths from ./experiments/dataset/shapenet_1000.json
[INFO/ReconstructionDataProcess-1] child process calling self.run()
Set the learning rate to 0.000100.
[INFO/ReconstructionDataProcess-2] child process calling self.run()
Compiling training function
Exiting
[INFO/ReconstructionDataProcess-2] process shutting down
2017-06-27 09:06:57.187543 Iter: 0 Loss: 0.502873
[INFO/ReconstructionDataProcess-2] process exiting with exitcode 0
Compiling testing function

I attempted a lot of times, but failed at the same place. I don't know the reason, since I just change the training dataset. Thanks in advance.

Can I use the CPU mode to train the network?

Is it possible to train this model using only CPU. When I use only CPU, it stops and show:

lib/data_io.py: model paths from ./experiments/dataset/shapenet_1000.json
[INFO/ReconstructionDataProcess-1] child process calling self.run()
lib/data_io.py: model paths from ./experiments/dataset/shapenet_1000.json
Set the learning rate to 0.000100.
[INFO/ReconstructionDataProcess-2] child process calling self.run()
Compiling training function
WARNING (theano.tensor.blas): We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library.
2017-03-31 09:19:01.570096 Iter: 0 Loss: 0.722025
Compiling testing function

==========================
Does it mean that the training is stopped or the training needs more time?

Thank you very much.

training function Iter

Hi, I'm sorry to bother you. While when I training this net,here is the message:
[INFO/ReconstructionDataProcess-2] child process calling self.run()
Compiling training function
2017-10-26 15:53:53.110990 Iter: 0 Loss: 0.70881
Compiling testing function

Does it right ? And why Iter is 0.
Thank you for your reply

Vanilla GRU

I am a freshman of deep learning and have a problem here. In your code of res_gru_net.py, is your GRU part a vanilla one or a 3D GRU?

update_gate_ = SigmoidLayer(t_x_s_update_)
comp_update_gate_ = ComplementLayer(update_gate_)
reset_gate_ = SigmoidLayer(t_x_s_reset_)

rs_ = EltwiseMultiplyLayer(reset_gate_, prev_s_)
t_x_rs_ = FCConv3DLayer(
                rs_, rect7_, (n_deconvfilter[0], n_deconvfilter[0], 3, 3, 3), params=t_x_rs.params)
            tanh_t_x_rs_ = TanhLayer(t_x_rs_)

Thank you for your reply.

ValueError: You are tring to use the old GPU back-end.

Hi I use windows 10 to implement the project and it turns out the error below:
ValueError: You are tring to use the old GPU back-end. It was removed from Theano. Use device=cuda*

I tried to follow your link that from error
https://github.com/Theano/Theano/wiki/Converting-to-the-new-gpu-back-end%28gpuarray%29
and install theano pygpu, but nothing good come out.

I also tried change the Theano variable device = gpu to device = cuda0 and it gives me the error below:

(py3) C:\Users\speed\source\3D-R2N2>python demo.py prediction.obj
WARNING (theano.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
ERROR (theano.gpuarray): pygpu was configured but could not be imported or is too old (version 0.7 or higher required)
NoneType
Downloading a pretrained model
Traceback (most recent call last):
File "demo.py", line 84, in
main()
File "demo.py", line 55, in main
download_model(DEFAULT_WEIGHTS)
File "demo.py", line 34, in download_model
'--create-dirs', '-o', fn])
File "C:\Users\speed\AppData\Local\Programs\Python\Python35\Lib\subprocess.py", line 557, in call
with Popen(*popenargs, **kwargs) as p:
File "C:\Users\speed\AppData\Local\Programs\Python\Python35\Lib\subprocess.py", line 947, in init
restore_signals, start_new_session)
File "C:\Users\speed\AppData\Local\Programs\Python\Python35\Lib\subprocess.py", line 1224, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

Could you please advise me the way to compile it, thanks.

Cudnn mismatch version

Just an issue i ran into while running the instruction so I'm documenting it here, even though it's not an issue with the project.
Using cudnn v6 on Ubuntu 16.04 fails.
the error message

mod.cu(77): error: identifier "cudnnSetFilterNdDescriptor_v4" is undefined
mod.cu(326): warning: conversion from a string literal to "char *" is deprecated
mod.cu(329): warning: conversion from a string literal to "char *" is deprecated
mod.cu(332): warning: conversion from a string literal to "char *" is deprecated
mod.cu(335): warning: conversion from a string literal to "char *" is deprecated
mod.cu(338): warning: conversion from a string literal to "char *" is deprecated
mod.cu(341): warning: conversion from a string literal to "char *" is deprecated
mod.cu(345): warning: conversion from a string literal to "char *" is deprecated
1 error detected in the compilation of "/tmp/tmpxft_000032de_00000000-9_mod.cpp1.ii".

Removing Cudnn solved it. One could also downgrade to 5.1 probably, haven't tried it though.

I suggest mentionning it in the README. Very nice work by the way.

Why does the code and the net architecture of Res_GRU in the paper don't match?

In the paper, there is a shortcut in the first conv pair, but the code does not show it. Moreover, there is a 1*1 conv in the shortcut of the 6th conv pair, but the code also does't show it.

`def recurrence(x_curr, prev_s_tensor, prev_in_gate_tensor):
# Scan function cannot use compiled function.
input_ = InputLayer(input_shape, x_curr)
conv1a_ = ConvLayer(input_, (n_convfilter[0], 7, 7), params=conv1a.params)
rect1a_ = LeakyReLU(conv1a_)
conv1b_ = ConvLayer(rect1a_, (n_convfilter[0], 3, 3), params=conv1b.params)
rect1_ = LeakyReLU(conv1b_)
pool1_ = PoolLayer(rect1_)

        conv2a_ = ConvLayer(pool1_, (n_convfilter[1], 3, 3), params=conv2a.params)
        rect2a_ = LeakyReLU(conv2a_)
        conv2b_ = ConvLayer(rect2a_, (n_convfilter[1], 3, 3), params=conv2b.params)
        rect2_ = LeakyReLU(conv2b_)
        conv2c_ = ConvLayer(pool1_, (n_convfilter[1], 1, 1), params=conv2c.params)
        res2_ = AddLayer(conv2c_, rect2_)
        pool2_ = PoolLayer(res2_)

        conv3a_ = ConvLayer(pool2_, (n_convfilter[2], 3, 3), params=conv3a.params)
        rect3a_ = LeakyReLU(conv3a_)
        conv3b_ = ConvLayer(rect3a_, (n_convfilter[2], 3, 3), params=conv3b.params)
        rect3_ = LeakyReLU(conv3b_)
        conv3c_ = ConvLayer(pool2_, (n_convfilter[2], 1, 1), params=conv3c.params)
        res3_ = AddLayer(conv3c_, rect3_)
        pool3_ = PoolLayer(res3_)

        conv4a_ = ConvLayer(pool3_, (n_convfilter[3], 3, 3), params=conv4a.params)
        rect4a_ = LeakyReLU(conv4a_)
        conv4b_ = ConvLayer(rect4a_, (n_convfilter[3], 3, 3), params=conv4b.params)
        rect4_ = LeakyReLU(conv4b_)
        pool4_ = PoolLayer(rect4_)

        conv5a_ = ConvLayer(pool4_, (n_convfilter[4], 3, 3), params=conv5a.params)
        rect5a_ = LeakyReLU(conv5a_)
        conv5b_ = ConvLayer(rect5a_, (n_convfilter[4], 3, 3), params=conv5b.params)
        rect5_ = LeakyReLU(conv5b_)
        conv5c_ = ConvLayer(pool4_, (n_convfilter[4], 1, 1), params=conv5c.params)
        res5_ = AddLayer(conv5c_, rect5_)
        pool5_ = PoolLayer(res5_)

        conv6a_ = ConvLayer(pool5_, (n_convfilter[5], 3, 3), params=conv6a.params)
        rect6a_ = LeakyReLU(conv6a_)
        conv6b_ = ConvLayer(rect6a_, (n_convfilter[5], 3, 3), params=conv6b.params)
        rect6_ = LeakyReLU(conv6b_)
        res6_ = AddLayer(pool5_, rect6_)
       pool6_ = PoolLayer(res6_)`

NameError: name 'CVM' is not defined

I've followed your directions for utilization and can run the demo perfectly. However, when I try to train the model, the training will commence fine, but then I always get this error:

   vm = CVM(

NameError: ('The following error happened while compiling the node', forall_inplace,cpu,scan_fn}
(Elemwise{maximum,no_inplace}.0, Subtensor{int64:int64:int8}.0, IncSubtensor{InplaceSet;:int64:}.0, 
IncSubtensor{InplaceSet;:int64:}.0, <TensorType(float32, 4D)>, <TensorType(float32, 4D)>, 
<TensorType(float32, 4D)>, <TensorType(float32, 4D)>, <TensorType(float32, 4D)>, 
<TensorType(float32, 4D)>, <TensorType(float32, 4D)>, <TensorType(float32, 4D)>, 
<TensorType(float32, 4D)>, <TensorType(float32, 4D)>, <TensorType(float32, 4D)>, 
<TensorType(float32, 4D)>, <TensorType(float32, 4D)>, <TensorType(float32, 4D)>, 
<TensorType(float32, 4D)>, <TensorType(float32, matrix)>, <TensorType(float32, matrix)>, 
<TensorType(float32, matrix)>, <TensorType(float32, matrix)>, InplaceDimShuffle{x,x,0,x,x}.0, 
InplaceDimShuffle{x,0}.0, InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, 
InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, 
InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, 
InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, 
InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,0,x,x}.0, 
InplaceDimShuffle{x,0,x,x}.0, InplaceDimShuffle{x,x,0,x,x}.0, InplaceDimShuffle{x,x,0,x,x}.0, Shape_i{4}.0, Shape_i{3}.0, Shape_i{1}.0, Shape_i{0}.0, Shape_i{2}.0, Shape_i{4}.0, Shape_i{3}.0, Shape_i{1}.0, 
Shape_i{0}.0, Shape_i{2}.0, Shape_i{4}.0, Shape_i{3}.0, Shape_i{1}.0, Shape_i{0}.0, Shape_i{2}.0, 
Reshape{4}.0, Reshape{4}.0, Reshape{4}.0), '\n', "name 'CVM' is not defined")

I'm not sure yet how to handle this. Most 'not-defined' CVM issues I've googled seem to have specific windows-based answers, irrelevant to my linux install. Any insight here would be super helpful. Thanks!

Error after updating theano to 1.0.1 and updating padding variable to pad

Following is the error log that is generated. Kindly suggest. I am trying to execute the code on Windows 10 platform with anaconda 3.5

(base) D:\3D-R2N2-master>python demo.py p1.obj
Using cuDNN version 5110 on context None
Mapped name None to device cuda0: GeForce GTX 960M (0000:02:00.0)
Traceback (most recent call last):
File "demo.py", line 84, in
main()
File "demo.py", line 61, in main
net = NetClass(compute_grad=False) # instantiate a network
File "D:\3D-R2N2-master\models\net.py", line 37, in init
self.setup()
File "D:\3D-R2N2-master\models\net.py", line 40, in setup
self.network_definition()
File "D:\3D-R2N2-master\models\res_gru_net.py", line 160, in network_definition
dtype=theano.config.floatX)])
File "D:\Anaconda3\lib\site-packages\theano\scan_module\scan.py", line 773, in scan
condition, outputs, updates = scan_utils.get_updates_and_outputs(fn(*args))
File "D:\3D-R2N2-master\models\res_gru_net.py", line 153, in recurrence
return gru_out_.output, update_gate_.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 225, in set_output
self._output = self._prev_layer.output * self._mult_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 657, in set_output
self._output = sigmoid(self._prev_layer.output)
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 504, in set_output
tensor.dot(self._fc_layer.output, self.Wx.val), self._output_shape)
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 159, in set_output
self._output = tensor.dot(self._prev_layer.output, self.W.val)
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 236, in set_output
self._prev_layer.output.flatten(2) # flatten from the second dim
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 351, in set_output
input=self._prev_layer.output,
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 351, in set_output
input=self._prev_layer.output,
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 319, in set_output
padded_input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 351, in set_output
input=self._prev_layer.output,
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 313, in set_output
self._prev_layer.output)
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 313, in set_output
self._prev_layer.output)
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 351, in set_output
input=self._prev_layer.output,
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 319, in set_output
padded_input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 351, in set_output
input=self._prev_layer.output,
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 214, in set_output
self._output = self._prev_layer.output + self._add_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 319, in set_output
padded_input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 351, in set_output
input=self._prev_layer.output,
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 637, in set_output
self._input = self._prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 313, in set_output
self._prev_layer.output)
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 637, in set_output
self._input = self.prev_layer.output
File "D:\3D-R2N2-master\lib\layers.py", line 129, in output
self.set_output()
File "D:\3D-R2N2-master\lib\layers.py", line 328, in set_output
border_mode='valid')
File "D:\Anaconda3\lib\site-packages\theano\tensor\nnet_init
.py", line 169, in conv2d
filter_dilation, num_groups, unshared)
File "D:\Anaconda3\lib\site-packages\theano\tensor\nnet\abstract_conv.py", line 643, in conv2d
unshared=unshared)
File "D:\Anaconda3\lib\site-packages\theano\tensor\nnet\abstract_conv.py", line 2465, in init
unshared=unshared)
File "D:\Anaconda3\lib\site-packages\theano\tensor\nnet\abstract_conv.py", line 2314, in init
unshared=unshared)
File "D:\Anaconda3\lib\site-packages\theano\tensor\nnet\abstract_conv.py", line 2103, in init
self.imshp = tuple(imshp) if imshp else (None,) * (2 + convdim)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

The image and the kernel must have the same type

When I was trying to run the demo.py in Windows OS, I got an error saying "NotImplementedError: The image and the kernel must have the same type.inputs(float32), kerns(float64)"

I tracked back the error source, and realized that it is because the network class has not taken any input images in the Net.init() function, which has only lines like this:
self.x = tensor.tensor4() #
self.is_x_tensor4 = True
self.y = tensor5();
But none of these lines feed any input image in.

Does anyone has any idea how to resolve this issue? Since I can see that many are running this program, I am wondering maybe I got an old version of the code?

ERROR (theano.sandbox.gpuarray): Could not initialize pygpu……

When I want to try to implement other projects with this method, but some environmental problems have been bothering me for a long time.
My environment is built according to what you said. And theano=0.8.0, pygpu=0.7.6, but when I try import theano, it always give an error “ERROR (theano.sandbox.gpuarray): Could not initialize pygpu, support disabled”, could you plz give some ideal?
Look forward to your reply~

How to render image given camera params in your dataset?

Hi, I'm sort of confused by the camera params in your image rendering dataset. Could you provide a more specific explanation for it? Say, I have a 3d model from ShapeNet, and want to render the image based on the given camera params, how to put my camera in blender? Currently, I used camera params to calculate the camera position, and set it to always look at the object in (0, 0, 0), but it seems look different with the rendered image you provided. Hope to get your reply, thanks a lot!

Explanation of rendering data

Dear Author,

I downloaded rendering image dataset. Can you give a simple explanation about the meaning of each lines in file rendering_metadata.txt ?

Thank you so much.

How to use an image of resolution higher than 127x127x3?

I am having problem to use an image with size different than 127x127x3. For example I want to use an image of higher resolution such as 255x255x3. I tried to change width and height in config.py but I am getting following error.

Compiling testing function
Traceback (most recent call last):
File "scan_perform.pyx", line 397, in theano.scan_module.scan_perform.perform
ValueError: Shape mismatch: A.shape[1] != x.shape[0]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/faz/.conda/envs/py-theano/lib/python3.6/site-packages/theano/compile/function_module.py", line 903, in call
self.fn() if output_subset is None else
File "/home/faz/.conda/envs/py-theano/lib/python3.6/site-packages/theano/scan_module/scan_op.py", line 963, in rval
r = p(n, [x[0] for x in i], o)
File "/home/faz/.conda/envs/py-theano/lib/python3.6/site-packages/theano/scan_module/scan_op.py", line 952, in p
self, node)
File "scan_perform.pyx", line 405, in theano.scan_module.scan_perform.perform
File "/home/faz/.conda/envs/py-theano/lib/python3.6/site-packages/theano/gof/link.py", line 325, in raise_with_op
reraise(exc_type, exc_value, exc_trace)
File "/home/faz/.conda/envs/py-theano/lib/python3.6/site-packages/six.py", line 692, in reraise
raise value.with_traceback(tb)
File "scan_perform.pyx", line 397, in theano.scan_module.scan_perform.perform
ValueError: Shape mismatch: A.shape[1] != x.shape[0]
Apply node that caused the error: CGemv{no_inplace}(InplaceDimShuffle{1}.0, TensorConstant{1.0}, InplaceDimShuffle{1,0}.0, Reshape{1}.0, TensorConstant{1.0})
Toposort index: 101
Inputs types: [TensorType(float32, vector), TensorType(float32, scalar), TensorType(float32, matrix), TensorType(float32, vector), TensorType(float32, scalar)]
Inputs shapes: [(1024,), (), (1024, 2304), (6400,), ()]
Inputs strides: [(4,), (), (4, 4096), (4,), ()]
Inputs values: ['not shown', array(1., dtype=float32), 'not shown', 'not shown', array(1., dtype=float32)]
Inputs type_num: [11, 11, 11, 11, 11]
Outputs clients: [[InplaceDimShuffle{x,0}(CGemv{no_inplace}.0)]]
......
some more lines of error
......
TotalSize: 204525889.0 Byte(s) 0.190 GB
TotalSize inputs: 204361897.0 Byte(s) 0.190 GB

HINT: Re-running with most Theano optimization disabled could give you a back-trace of when this node was created. This can be done with by setting the Theano flag 'optimizer=fast_compile'. If that does not work, Theano optimizations can be disabled with 'optimizer=None'.

Is there anyone who used this code for image of resolution different than 127x127x3?

After activating env, runing demo.py cause "Problem occurred during compilation"

Hi, i was trying to reproduce the experiment, and i follow the given instructions, however, i will get an environment with python 3.4 where the code complain syntax error. I try to explicitly define a python 3.5 environment, however, more errors comes, listed as following, could any one help me? Thanks!

Problem occurred during compilation with the command line below:

- /usr/bin/g++ -shared -g -march=core-avx2 -mcx16 -msahf -mmovbe -maes -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=15360 -mtune=generic -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -fPIC -I/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/numpy/core/include -I/root/.pyenv/versions/3.5.1/include/python3.5m -I/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/gof -fvisibility=hidden -o /root/.theano/compiledir_Linux-4.4--generic-x86_64-with-debian-jessie-sid-x86_64-3.5.1-64/lazylinker_ext/lazylinker_ext.so /root/.theano/compiledir_Linux-4.4--generic-x86_64-with-debian-jessie-sid-x86_64-3.5.1-64/lazylinker_ext/mod.cpp -L/root/.pyenv/versions/3.5.1/lib -lpython3.5m
- /usr/bin/ld: /root/.pyenv/versions/3.5.1/lib/libpython3.5m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
- /root/.pyenv/versions/3.5.1/lib/libpython3.5m.a: error adding symbols: Bad value
- collect2: error: ld returned 1 exit status
- 
- Traceback (most recent call last):
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 74, in <module>
-     raise ImportError()
- ImportError
- 
- During handling of the above exception, another exception occurred:
- 
- Traceback (most recent call last):
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 91, in <module>
-     raise ImportError()
- ImportError
- 
- During handling of the above exception, another exception occurred:
- 
- Traceback (most recent call last):
-   File "demo.py", line 17, in <module>
-     from models import load_model
-   File "/home/yht/yang3d/hope/3D-R2N2/models/__init__.py", line 1, in <module>
-     from models.gru_net import GRUNet
-   File "/home/yht/yang3d/hope/3D-R2N2/models/gru_net.py", line 4, in <module>
-     import theano
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/__init__.py", line 63, in <module>
-     from theano.compile import (
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/compile/__init__.py", line 9, in <module>
-     from theano.compile.function_module import *
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/compile/function_module.py", line 22, in <module>
-     import theano.compile.mode
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/compile/mode.py", line 12, in <module>
-     import theano.gof.vm
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/gof/vm.py", line 638, in <module>
-     from . import lazylinker_c
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/gof/lazylinker_c.py", line 126, in <module>
-     preargs=args)
-   File "/root/.pyenv/versions/3.5.1/lib/python3.5/site-packages/theano/gof/cmodule.py", line 2204, in compile_str
-     (status, compile_stderr.replace('\n', '. ')))
- Exception: Compilation failed (return status=1): /usr/bin/ld: /root/.pyenv/versions/3.5.1/lib/libpython3.5m.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC. /root/.pyenv/versions/3.5.1/lib/libpython3.5m.a: error adding symbols: Bad value. collect2: error: ld returned 1 exit status. 

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.