weixin_39743423
weixin_39743423
2020-12-25 20:13

Using TensorFlow backend

Hello, , 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

该提问来源于开源项目:imatge-upc/detection-2016-nipsws

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39929566 weixin_39929566 4月前

    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.

    点赞 评论 复制链接分享
  • weixin_39743423 weixin_39743423 4月前

    Thanks a lot , I will try

    点赞 评论 复制链接分享
  • weixin_39743423 weixin_39743423 4月前

    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

    点赞 评论 复制链接分享
  • weixin_39929566 weixin_39929566 4月前

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

    点赞 评论 复制链接分享