Skip to content

Commit

Permalink
fix tensorflow#247 Set GeM default P value to 3.0.
Browse files Browse the repository at this point in the history
This better aligns the default value with the value used in the original
paper. https://arxiv.org/pdf/1711.02512.pdf
  • Loading branch information
owenvallis committed Mar 18, 2022
1 parent c8a1b5f commit df0929a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tensorflow_similarity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = '0.15.6'
__version__ = '0.15.7'


from . import algebra # noqa
Expand Down
6 changes: 3 additions & 3 deletions tensorflow_similarity/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def get_config(self) -> Dict[str, Any]:
class GeneralizedMeanPooling(layers.Layer):
def __init__(
self,
p: float = 1.0,
p: float = 3.0,
data_format: Optional[str] = None,
keepdims: bool = False,
**kwargs
Expand Down Expand Up @@ -220,7 +220,7 @@ class GeneralizedMeanPooling1D(GeneralizedMeanPooling):

def __init__(
self,
p: float = 1.0,
p: float = 3.0,
data_format: Optional[str] = None,
keepdims: bool = False,
**kwargs
Expand Down Expand Up @@ -316,7 +316,7 @@ class GeneralizedMeanPooling2D(GeneralizedMeanPooling):

def __init__(
self,
p: float = 1.0,
p: float = 3.0,
data_format: Optional[str] = None,
keepdims: bool = False,
**kwargs
Expand Down

0 comments on commit df0929a

Please sign in to comment.