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

Remove extra activation layer in image_classification_from_scratch.py #1418

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/vision/image_classification_from_scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ def make_model(input_shape, num_classes):
x = layers.Rescaling(1.0 / 255)(inputs)
x = layers.Conv2D(128, 3, strides=2, padding="same")(x)
x = layers.BatchNormalization()(x)
x = layers.Activation("relu")(x)

previous_block_activation = x # Set aside residual

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@
" x = layers.Rescaling(1.0 / 255)(inputs)\n",
" x = layers.Conv2D(128, 3, strides=2, padding=\"same\")(x)\n",
" x = layers.BatchNormalization()(x)\n",
" x = layers.Activation(\"relu\")(x)\n",
"\n",
" previous_block_activation = x # Set aside residual\n",
"\n",
Expand Down Expand Up @@ -548,4 +547,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
3 changes: 1 addition & 2 deletions examples/vision/md/image_classification_from_scratch.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ def make_model(input_shape, num_classes):
x = layers.Rescaling(1.0 / 255)(inputs)
x = layers.Conv2D(128, 3, strides=2, padding="same")(x)
x = layers.BatchNormalization()(x)
x = layers.Activation("relu")(x)

previous_block_activation = x # Set aside residual

Expand Down Expand Up @@ -442,4 +441,4 @@ print(f"This image is {100 * (1 - score):.2f}% cat and {100 * score:.2f}% dog.")
This image is 85.28% cat and 14.72% dog.

```
</div>
</div>
Loading