From 6975b9eefa0dec91ab4145ce65f220293bfdfbb3 Mon Sep 17 00:00:00 2001 From: leondgarse Date: Tue, 5 Apr 2022 12:16:20 +0800 Subject: [PATCH] add evonorm links --- keras_cv_attention_models/attention_layers/__init__.py | 3 ++- keras_cv_attention_models/common_layers.py | 1 + keras_cv_attention_models/resnet_family/README.md | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/keras_cv_attention_models/attention_layers/__init__.py b/keras_cv_attention_models/attention_layers/__init__.py index fd04331a..4880f589 100644 --- a/keras_cv_attention_models/attention_layers/__init__.py +++ b/keras_cv_attention_models/attention_layers/__init__.py @@ -120,7 +120,8 @@ """ EvoNormalization.__doc__ = """ -Keras implementation of [PDF 2004.02967 Evolving Normalization-Activation Layers](https://arxiv.org/pdf/2004.02967.pdf). +Keras implementation of [evonorm](https://github.com/tensorflow/tpu/blob/master/models/official/resnet/resnet_model.py). +Paper [PDF 2004.02967 Evolving Normalization-Activation Layers](https://arxiv.org/pdf/2004.02967.pdf). Args: nonlinearity: boolean value if apply non-linearity calculation, default True. diff --git a/keras_cv_attention_models/common_layers.py b/keras_cv_attention_models/common_layers.py index f7a93e24..d47d598d 100644 --- a/keras_cv_attention_models/common_layers.py +++ b/keras_cv_attention_models/common_layers.py @@ -63,6 +63,7 @@ def activation_by_name(inputs, activation="relu", name=None): @tf.keras.utils.register_keras_serializable(package="kecamCommon") class EvoNormalization(tf.keras.layers.Layer): def __init__(self, nonlinearity=True, num_groups=-1, zero_gamma=False, momentum=0.99, epsilon=0.001, data_format="auto", **kwargs): + # [evonorm](https://github.com/tensorflow/tpu/blob/master/models/official/resnet/resnet_model.py) # EVONORM_B0: nonlinearity=True, num_groups=-1 # EVONORM_S0: nonlinearity=True, num_groups > 0 # EVONORM_B0 / EVONORM_S0 linearity: nonlinearity=False, num_groups=-1 diff --git a/keras_cv_attention_models/resnet_family/README.md b/keras_cv_attention_models/resnet_family/README.md index 24cedb9c..530ca405 100644 --- a/keras_cv_attention_models/resnet_family/README.md +++ b/keras_cv_attention_models/resnet_family/README.md @@ -116,7 +116,7 @@ | RegNetY320 | 145.05M | 224 | 82.5 | [regnety_320_imagenet.h5](https://github.com/leondgarse/keras_cv_attention_models/releases/download/resnet_family/regnety_320_imagenet.h5) | ## RegNetZ - Defined and model weights loaded from [Github timm/models/byobnet.py](https://github.com/rwightman/pytorch-image-models/blob/master/timm/models/byobnet.py). - - Related paper [PDF 2004.02967 Evolving Normalization-Activation Layers](https://arxiv.org/pdf/2004.02967.pdf). + - [evonorm](https://github.com/tensorflow/tpu/blob/master/models/official/resnet/resnet_model.py), paper [PDF 2004.02967 Evolving Normalization-Activation Layers](https://arxiv.org/pdf/2004.02967.pdf). | Model | Params | Image resolution | Top1 Acc | Download | | -------------- | ------ | ---------------- | -------- | -------- |