Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
90e17531
Commit
90e17531
authored
Apr 05, 2021
by
A. Unique TensorFlower
Browse files
Update documentations for ResNet-RS.
PiperOrigin-RevId: 366817283
parent
7b6c1bcb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
official/README.md
official/README.md
+1
-0
official/vision/beta/MODEL_GARDEN.md
official/vision/beta/MODEL_GARDEN.md
+3
-1
official/vision/beta/modeling/backbones/resnet.py
official/vision/beta/modeling/backbones/resnet.py
+9
-4
No files found.
official/README.md
View file @
90e17531
...
@@ -41,6 +41,7 @@ In the near future, we will add:
...
@@ -41,6 +41,7 @@ In the near future, we will add:
|-------|-------------------|
|-------|-------------------|
|
[
MNIST
](
vision/image_classification
)
| A basic model to classify digits from the
[
MNIST dataset
](
http://yann.lecun.com/exdb/mnist/
)
|
|
[
MNIST
](
vision/image_classification
)
| A basic model to classify digits from the
[
MNIST dataset
](
http://yann.lecun.com/exdb/mnist/
)
|
|
[
ResNet
](
vision/image_classification
)
|
[
Deep Residual Learning for Image Recognition
](
https://arxiv.org/abs/1512.03385
)
|
|
[
ResNet
](
vision/image_classification
)
|
[
Deep Residual Learning for Image Recognition
](
https://arxiv.org/abs/1512.03385
)
|
|
[
ResNet-RS
](
vision/image_classification
)
|
[
Revisiting ResNets: Improved Training and Scaling Strategies
](
https://arxiv.org/abs/2103.07579
)
|
|
[
EfficientNet
](
vision/image_classification
)
|
[
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
](
https://arxiv.org/abs/1905.11946
)
|
|
[
EfficientNet
](
vision/image_classification
)
|
[
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
](
https://arxiv.org/abs/1905.11946
)
|
#### Object Detection and Segmentation
#### Object Detection and Segmentation
...
...
official/vision/beta/MODEL_GARDEN.md
View file @
90e17531
...
@@ -20,8 +20,10 @@ TF Vision model garden provides a large collection of baselines and checkpoints
...
@@ -20,8 +20,10 @@ TF Vision model garden provides a large collection of baselines and checkpoints
#### ResNet-RS models trained with settings including:
#### ResNet-RS models trained with settings including:
We support state-of-the-art
[
ResNet-RS
](
https://arxiv.org/abs/2103.07579
)
image classification models with features:
*
ResNet-RS architectural changes and Swish activation.
*
ResNet-RS architectural changes and Swish activation. (Note that ResNet-RS
adopts ReLU activation in the paper.)
*
Regularization methods including Random Augment, 4e-5 weight decay, stochastic depth, label smoothing and dropout.
*
Regularization methods including Random Augment, 4e-5 weight decay, stochastic depth, label smoothing and dropout.
*
New training methods including a 350-epoch schedule, cosine learning rate and
*
New training methods including a 350-epoch schedule, cosine learning rate and
EMA.
EMA.
...
...
official/vision/beta/modeling/backbones/resnet.py
View file @
90e17531
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
"""Contains definitions of Res
idual Network
s."""
"""Contains definitions of Res
Net and ResNet-RS model
s."""
# Import libraries
# Import libraries
import
tensorflow
as
tf
import
tensorflow
as
tf
...
@@ -87,12 +87,16 @@ RESNET_SPECS = {
...
@@ -87,12 +87,16 @@ RESNET_SPECS = {
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
'Vision'
)
@
tf
.
keras
.
utils
.
register_keras_serializable
(
package
=
'Vision'
)
class
ResNet
(
tf
.
keras
.
Model
):
class
ResNet
(
tf
.
keras
.
Model
):
"""Creates
a
ResNet family model.
"""Creates
ResNet and
ResNet
-RS
family model
s
.
This implements the Deep Residual Network from:
This implements the Deep Residual Network from:
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun.
Deep Residual Learning for Image Recognition.
Deep Residual Learning for Image Recognition.
(https://arxiv.org/pdf/1512.03385)
(https://arxiv.org/pdf/1512.03385) and
Irwan Bello, William Fedus, Xianzhi Du, Ekin D. Cubuk, Aravind Srinivas,
Tsung-Yi Lin, Jonathon Shlens, Barret Zoph.
Revisiting ResNets: Improved Training and Scaling Strategies.
(https://arxiv.org/abs/2103.07579).
"""
"""
def
__init__
(
self
,
def
__init__
(
self
,
...
@@ -118,7 +122,8 @@ class ResNet(tf.keras.Model):
...
@@ -118,7 +122,8 @@ class ResNet(tf.keras.Model):
model_id: An `int` of the depth of ResNet backbone model.
model_id: An `int` of the depth of ResNet backbone model.
input_specs: A `tf.keras.layers.InputSpec` of the input tensor.
input_specs: A `tf.keras.layers.InputSpec` of the input tensor.
depth_multiplier: A `float` of the depth multiplier to uniformaly scale up
depth_multiplier: A `float` of the depth multiplier to uniformaly scale up
all layers in channel size in ResNet.
all layers in channel size. This argument is also referred to as
`width_multiplier` in (https://arxiv.org/abs/2103.07579).
stem_type: A `str` of stem type of ResNet. Default to `v0`. If set to
stem_type: A `str` of stem type of ResNet. Default to `v0`. If set to
`v1`, use ResNet-D type stem (https://arxiv.org/abs/1812.01187).
`v1`, use ResNet-D type stem (https://arxiv.org/abs/1812.01187).
resnetd_shortcut: A `bool` of whether to use ResNet-D shortcut in
resnetd_shortcut: A `bool` of whether to use ResNet-D shortcut in
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment