RotNet
RotNet copied to clipboard
ValueError: Unknown layer: Merge
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
I'm not sure, it's been a while since I don't use Keras. Maybe you are using an incompatible version?
I faced this problem, too. I exactly installed dependencies as printed in requirements.txt. any solution?
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.
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.
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.
Download and use pretrained model 'rotnet_street_view_resnet50_keras2.hdf5' , it works ! https://drive.google.com/open?id=0B9eNEi5uvOI1SjQ5M2tQY3ZMM1U