imatge-upc / detection-2016-nipsws

Hierarchical Object Detection with Deep Reinforcement Learning
http://imatge-upc.github.io/detection-2016-nipsws/
MIT License
423 stars 129 forks source link

Using TensorFlow backend #3

Closed NIEYALI closed 7 years ago

NIEYALI commented 7 years ago

Hello, @miriambellver , I met a problem, I installed theano and tensorflow, But when I run image_zooms_testing.py, It has a problem,"Using TensorFlow backend. and ValueError: Filter must not be larger than the input: Filter: (2, 2) Input: (1, 112)" Do you know what's the problem? thanks a lot

miriambellver commented 7 years ago

I did all the experiments using Theano backend so I don't know why Tensorflow backend with your version does not work. I would simply suggest using Theano backend instead.

NIEYALI commented 7 years ago

Thanks a lot , I will try

NIEYALI commented 7 years ago

Hello,miriambellver, I tried to use Theano (0.8.2) and Keras (1.0.8). but now it still has problem: Using Theano backend. Traceback (most recent call last): File "image_zooms_training.py", line 77, in model_vgg = obtain_compiled_vgg_16(path_vgg) File "/home/nyl/Documents/detection/scripts/features.py", line 203, in obtain_compiled_vgg_16 model = vgg_16(vgg_weights_path) File "/home/nyl/Documents/detection/scripts/features.py", line 247, in vgg_16 model.add(Flatten()) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 308, in add output_tensor = layer(self.outputs[0]) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 515, in call self.add_inbound_node(inbound_layers, node_indices, tensor_indices) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 573, in add_inbound_node Node.create_node(self, inbound_layers, node_indices, tensor_indices) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 153, in create_node output_shapes = to_list(outbound_layer.get_output_shape_for(input_shapes[0])) File "/usr/local/lib/python2.7/dist-packages/keras/layers/core.py", line 403, in get_output_shape_for '(got ' + str(input_shape[1:]) + '. ' Exception: The shape of the input to "Flatten" is not fully defined (got (0, 7, 512). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.

Do you have any idea about it? Thanks a lot

miriambellver commented 7 years ago

Seeing issue #5, I guess you were able to run the code! I close this issue