Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error from loading a Keras model #12

Open
peterwu19881230 opened this issue Aug 22, 2022 · 2 comments
Open

Error from loading a Keras model #12

peterwu19881230 opened this issue Aug 22, 2022 · 2 comments

Comments

@peterwu19881230
Copy link

Hi, dear developers:

When I was opening the following notebook in colab:
https://colab.research.google.com/github/ImagingDataCommons/IDC-Examples/blob/master/notebooks/lung_nodules_demo.ipynb

I wasn't able to load the model based on the json file: dp_arch.json

The error message is:
TypeError: init() missing 2 required positional arguments: 'filters' and 'kernel_size'

There are some instruction that relates to this. However, I am confused with the wording "change all the layers" at this time
"""
N.B. any warnings are due to the fact that the model was developed for
Keras 1, and the config file has been converted in a Keras-2-compatible file

Nonetheless, Keras 2 uses different naming conventions/def.s, so in order to
get rid of the warnings one should change all the layers def.s in the JSON file
"""

May I get some help from you?

Thanks!

@wlongabaugh
Copy link
Member

@denbonte Can you provide guidance here?

@denbonte
Copy link
Contributor

Dear Peter,

TypeError: init() missing 2 required positional arguments: 'filters' and 'kernel_size'

We know about this error and discussed about it (and how to fix it!) in this thread on the IDC forum. Unfortunately, Google removed native support for TensorFlow 1.x from Colab - so there is nothing we can do besides manually downgrade the TensorFlow version. This will affect ALL the models developed with TF 1.x running on Colab - not only the one we are using!

If you have any more questions, feel free to continue the thread here or join the discussion on the IDC forum!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants