marcellacornia / sam

Predicting Human Eye Fixations via an LSTM-based Saliency Attentive Model. IEEE Transactions on Image Processing (2018)
https://ieeexplore.ieee.org/document/8400593
MIT License
205 stars 76 forks source link

ValueError: Dimension 2 in both shapes must be equal, but are 320 and 64 for 'Assign_3' (op: 'Assign') with input shapes: [7,7,320,64], [7,7,64,3]. #7

Closed sanalmgr closed 6 years ago

sanalmgr commented 6 years ago

Hi,

I am using the things (testing - by Command "python main.py sample_images/") as it is... but receiving the error, please help me how to resolve this error:

ValueError: Dimension 2 in both shapes must be equal, but are 320 and 64 for 'Assign_3' (op: 'Assign') with input shapes: [7,7,320,64], [7,7,64,3].

marcellacornia commented 6 years ago

Hi @sanalmgr, thanks for downloading our code.

Which Keras version are you using? This code is compatible with Keras 1.1.0 only. Also, you have to use Theano as backend. Please check in your keras.json file if the image_dim_ordering is set to "th".

kfzyqin commented 5 years ago

Same problem here. Keras version: 2.2.4

kfzyqin commented 5 years ago

Setting "image_data_format": "channels_first" solves the issue.

1404020219 commented 5 years ago

ValueError: Dimension 0 in both shapes must be equal, but are 7 and 64. Shapes are [7,7,320,64] and [64,3,7,7]. for 'Assign' (op: 'Assign') with input shapes: [7,7,320,64], [64,3,7,7]. @ZhenyueQin After Setting "image_data_format": "channels_first" ,so sad==

1404020219 commented 5 years ago

why?

kfzyqin commented 5 years ago

@1404020219 Sorry I could not solve more issues until I changed the Keras version to the author's one.

oalvarezc commented 5 years ago

Con la versión 2.2.4 keras, lo solucioné implementando en Conv2D data_format='channels_first'