PySyft-TensorFlow
PySyft-TensorFlow copied to clipboard
Update Part 2 tutorial to include Dropout layer in Custom model example.
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.
I can try and solve this :)
Hey @murarugeorgec, did you make any progress? Otherwise, I can take up this issue.
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!
@arshjot I did not start looking into it. You can take it if you want
Thanks @murarugeorgec! @arshjot the issue is assigned to you :) thanks
Thank you guys! I've just submitted a PR to fix this :)
Hey I would love to try to solve this