RotNet icon indicating copy to clipboard operation
RotNet copied to clipboard

ValueError: Unknown layer: Merge

Open Firas-Zarai opened this issue 4 years ago • 6 comments

when I'm trying to load the pre-trained model"rotnet_street_view_resnet50.hdf5" provided on the google drive file I go these error fff

Firas-Zarai avatar May 11 '20 23:05 Firas-Zarai

I'm not sure, it's been a while since I don't use Keras. Maybe you are using an incompatible version?

d4nst avatar May 23 '20 11:05 d4nst

I faced this problem, too. I exactly installed dependencies as printed in requirements.txt. any solution?

hbasafa avatar May 31 '20 08:05 hbasafa

It looks like the version in the requirements is wrong. See these issues: https://github.com/keras-team/keras/issues/10377 and https://github.com/orobix/retina-unet/issues/55

So please try downgrading Keras version to fix it. I would suggest you try Keras 1.2.2 since that was the last version before Keras 2 and the code was written before Keras 2 was released. If that works, please leave a comment here, or even better, submit a PR to change the version in requirements.txt so that other people don't face this issue.

d4nst avatar May 31 '20 11:05 d4nst

Your requirements listed version 2.3.0 of Keras though.

If I am not wrong, we just have to go through the training process to obtain a model that is compatible with version 2 of Keras. Your pre-trained model was probably generated from an older version of Keras (< v2) and thus is incompatible with version 2.3.0.

crameth avatar Jun 30 '20 05:06 crameth

Tried with 1.2.2, but results in TensorFlow compatibility issue:

AttributeError: module 'tensorflow' has no attribute 'placeholder'

Should be easily resolved by downgrading TensorFlow as well... or just re-train the model using the new versions of Keras and TF.

Edit: Resolved TF compatibility issue by downgrading to 1.15. Note that TF 1.15 is incompatible with CUDA 10.2.

crameth avatar Jun 30 '20 06:06 crameth

Download and use pretrained model 'rotnet_street_view_resnet50_keras2.hdf5' , it works ! https://drive.google.com/open?id=0B9eNEi5uvOI1SjQ5M2tQY3ZMM1U

Aravinda89 avatar Aug 13 '20 07:08 Aravinda89