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

flatten error #23

Open aafmhh opened 6 years ago

aafmhh commented 6 years ago

Hi I'm a beginner and running the this code I installed keras 2.0.2, theano0.9.0 with (anaconda3)python3.5. and coding by pycharm on windows10. but I'm getting an error after image_zooms_training.py run:

File "C:/Users/heram/PycharmProjects/Hirarchical obj detec/scripts/image_zooms_training.py", line 78, in model_vgg = obtain_compiled_vgg_16(path_vgg) File "C:\Users\heram\PycharmProjects\Hirarchical obj detec\scripts\features.py", line 251, in obtain_compiled_vgg_16 model = vgg_16(vgg_weights_path) File "C:\Users\heram\PycharmProjects\Hirarchical obj detec\scripts\features.py", line 295, in vgg_16 model.add(Flatten()) File "C:\Users\heram\Anaconda3\envs\Hirarchical obj detec\lib\site-packages\keras\models.py", line 455, in add output_tensor = layer(self.outputs[0]) File "C:\Users\heram\Anaconda3\envs\Hirarchical obj detec\lib\site-packages\keras\engine\topology.py", line 559, in call output_shape = self.compute_output_shape(input_shape) File "C:\Users\heram\Anaconda3\envs\Hirarchical obj detec\lib\site-packages\keras\layers\core.py", line 488, in compute_output_shape '(got ' + str(input_shape[1:]) + '. ' ValueError: 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.

What is its cause?

zhanary commented 5 years ago

you can see the Train in Readme.txt

JerryIndus commented 5 years ago

Hi, I am also a beginner and run this code. I have already installed package using requirements.txt and installed tensorflow==1.12.0. I also meet this error. I think maybe it is caused by the different version between keras and tensorflow. But, I donnt know how to deal with it. Have you already solved this problem?