marcellacornia / mlnet

A Deep Multi-Level Network for Saliency Prediction. ICPR 2016
MIT License
94 stars 37 forks source link

Layer weight shape missmatch #1

Closed hrtavakoli closed 8 years ago

hrtavakoli commented 8 years ago

Running the method for test using the provided weights receive the following exception:

Exception: Layer weight shape (3, 3, 640, 64) not compatible with provided weight shape (64, 3, 3, 3)

baraldilorenzo commented 8 years ago

Hi @hrtavakoli, which backend are you using? MLNet supports Theano only.

hrtavakoli commented 8 years ago

Hi @baraldilorenzo, I am using theano backend. The error is from the ml_net_module function

model = ml_net_model(img_cols=shape_c, img_rows=shape_r, downsampling_factor_product=10)

where

conv1_1 = Convolution2D(64, 3, 3, weights=weights, activation='relu', border_mode='same')(input_ml_net)

is reached. It seems there is something wrong with the weight file of VGG network weights loaded into the memory.

hrtavakoli commented 8 years ago

Solved!

baraldilorenzo commented 8 years ago

Glad to hear that! We are trying to replicate the issue. Which was your Keras version and what did you do to solve?

hrtavakoli commented 8 years ago

Hi, It was a misconfiguration in the back-end. Basically,  if you forget to change the data type, but change the backend type, you would get such a nasty phenomena.

Bests,Hamed

On Monday, October 3, 2016 12:19 PM, Lorenzo Baraldi <notifications@github.com> wrote:

Glad to hear that! We are trying to replicate the issue. Which was your Keras version and what did you do to solve?— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

shaymush commented 7 years ago

Hi @hrtavakoli , I'm getting the same phenomena. What exactly did you change in the config file?

rabeya-akter commented 3 years ago

Solved!

how did you solve this?