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

Update Part 2 tutorial to include Dropout layer in Custom model example. #35

Open
yanndupis opened this issue Oct 22, 2019 · 7 comments
Assignees
Labels
Good first issue 🎓 Perfect for beginners, welcome to OpenMined!

Comments

@yanndupis
Copy link
Contributor

In Part 2 tutorial, for custom when including a Dropout layer in the custom model (tf.keras.models.Model subclassing), we were getting the following error when sending the model to a worker ( model gets saved with tf.keras.models.save_model during the process), we were getting the following error in #33 :

ValueError: Could not find matching function to call loaded from the SavedModel. Got:
  Positional arguments (2 total):
    * Tensor("inputs:0", shape=(None, 28, 28), dtype=float32)
    * Tensor("training:0", shape=(), dtype=bool)
  Keyword arguments: {}

Expected these arguments to match one of the following 4 option(s):

Option 1:
  Positional arguments (2 total):
    * TensorSpec(shape=(None, 28, 28), dtype=tf.float32, name='input_1')
    * False
  Keyword arguments: {}

Option 2:
  Positional arguments (2 total):
    * TensorSpec(shape=(None, 28, 28), dtype=tf.float32, name='input_1')
    * True
  Keyword arguments: {}

Option 3:
  Positional arguments (2 total):
    * TensorSpec(shape=(None, 28, 28), dtype=tf.float32, name='inputs')
    * False
  Keyword arguments: {}

Option 4:
  Positional arguments (2 total):
    * TensorSpec(shape=(None, 28, 28), dtype=tf.float32, name='inputs')
    * True
  Keyword arguments: {}

There was probably just a problem with the model definition. Would be great to have this custom model with a dropout layer working so it mirror perfectly the Sequential example.

@yanndupis yanndupis added the Good first issue 🎓 Perfect for beginners, welcome to OpenMined! label Oct 22, 2019
@gmuraru
Copy link
Member

gmuraru commented Oct 24, 2019

I can try and solve this :)

@arshjot
Copy link
Contributor

arshjot commented Nov 6, 2019

Hey @murarugeorgec, did you make any progress? Otherwise, I can take up this issue.

@yanndupis
Copy link
Contributor Author

Hey guys, thanks for offering your help!

@arshjot - if @murarugeorgec is already working on it, happy to help you identify another issue. (@arshjot just let us know, I can assign you the issue).

If you guys have any questions, do not hesitate to reach out in OM Slack. Thanks!

@gmuraru
Copy link
Member

gmuraru commented Nov 6, 2019

@arshjot I did not start looking into it. You can take it if you want

@yanndupis
Copy link
Contributor Author

yanndupis commented Nov 6, 2019

Thanks @murarugeorgec! @arshjot the issue is assigned to you :) thanks

@arshjot
Copy link
Contributor

arshjot commented Nov 7, 2019

Thank you guys! I've just submitted a PR to fix this :)

@yasmineChelly-95
Copy link

yasmineChelly-95 commented Mar 31, 2020

Hey I would love to try to solve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue 🎓 Perfect for beginners, welcome to OpenMined!
Projects
None yet
Development

No branches or pull requests

4 participants