TobyPDE / FRRN

Full Resolution Residual Networks for Semantic Image Segmentation
MIT License
276 stars 94 forks source link

Error running predict_frrn_a.py with the prerequisites mentioned in README #20

Open anjanakumar opened 7 years ago

anjanakumar commented 7 years ago

Hi !@TobyPDE I installed all the prerequisites as mentioned in README file. But i still get an error when i try to run predict_frrn_a.py Please help..

(frrn) mrl@mrl:~/FRRN$ python predict_frrn_a.py Enter path to CityScapes folder [/home/mrl/FRRN/leftImg8bit_trainvaltestt/leftImg8bit]: /home/mrl/FRRN/cityscapes Enter model filename [/home/mrl/FRRN/models/frrn_a.npz]: /home/mrl/FRRN/models/frrn_a.npz Define network... [0.34s] Load model... [0.37s] Compile validation function... [0.27s] Traceback (most recent call last): File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/type.py", line 267, in dtype_specs }[self.dtype] KeyError: 'object' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/basic.py", line 408, in constant_orvalue TensorType(dtype=x.dtype, broadcastable=bcastable), File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/type.py", line 50, in init self.dtype_specs() # error checking is done there File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/type.py", line 270, in dtype_specs % (self.class.name, self.dtype)) TypeError: Unsupported dtype for TensorType: object During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/basic.py", line 202, in as_tensor_variable return constant(x, name=name, ndim=ndim) File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/basic.py", line 422, in constant dtype=dtype) File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/basic.py", line 417, in constant_or_value raise TypeError("Could not convert %s to TensorType" % x, type(x)) TypeError: not all arguments converted during string formatting During handling of the above exception, another exception occurred: Traceback (most recent call last): File "predict_frrn_a.py", line 66, in test_predictions = lasagne.layers.get_output(network.output_layers, deterministic=True)[0] File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/lasagne/layers/helper.py", line 190, in get_output all_outputs[layer] = layer.get_output_for(layer_inputs, *kwargs) File "/home/mrl/FRRN/dltools/layers.py", line 36, in get_output_for return T.nnet.abstract_conv.bilinear_upsampling(input, self.factor) File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/nnet/abstract_conv.py", line 569, in bilinear_upsampling row ratio, col * ratio)) File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/var.py", line 327, in reshape return theano.tensor.basic.reshape(self, shape, ndim=ndim) File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/basic.py", line 4526, in reshape newshape = as_tensor_variable(newshape) File "/home/mrl/anaconda3/envs/frrn/lib/python3.5/sitepackages/theano/tensor/basic.py", line 208, in as_tensor_variable raise AsTensorError("Cannot convert %s to TensorType" % str_x, type(x)) theano.tensor.var.AsTensorError: ('Cannot convert (None, None, Elemwise{mul,no_inplace}.0, Elemwise{mul,no_inplace}.0) to TensorType', <class 'tuple'>)

TobyPDE commented 6 years ago

Can you try to rerun the test with the new release? Also make sure to check the dependencies via the provided script before.