NotImplementedError
HaoxuZhang opened this issue · 1 comments
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)
Setting 'theano.config.floatX = float32' might be useful