-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Make autoencoder easier to copy-paste #2215
Conversation
This commit simply removes the explicit `(28, 28)` and `784` which represented the shape of the FMNIST dataset. It rather uses a `shape` member variable which is passed into the constructor for the Autoencoder. This `shape` variable is set to be `shape = x_test.shape[1:]` by default.
PreviewPreview and run these notebook edits with Google Colab: Rendered notebook diffs available on ReviewNB.com.Format and styleUse the TensorFlow docs notebook tools to format for consistent source diffs and lint for style:$ python3 -m pip install -U --user git+https://github.com/tensorflow/docsIf commits are added to the pull request, synchronize your local branch: git pull origin patch-1
|
Just wanting to check in, and see if this sort of PR is welcome here? |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the submission - this is great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smoke tests found an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks for the approval! How often are the docs re-built? |
This one is updated nightly, but before it's merged it requires another internal review, so could take a day or two. |
Co-authored-by: Mark McDonald <[email protected]>
Thanks for helping out! |
This PR simply removes the explicit
(28, 28)
and784
which represented the shape of the FMNIST dataset.It rather uses a
shape
member variable which is passed into the constructor for the Autoencoder. Thisshape
variable is set to beshape = x_test.shape[1:]
by default.I often come to this page, since I forget exactly how to structure an Autoencoder in TF, and I always end up writing this little snippet out where I extract the
shape
variable into a member variable of the Autoencoder class.