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.