Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.
Open
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
14 changes: 7 additions & 7 deletions objax/nn/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class BatchNorm(Module):
<https://arxiv.org/abs/1502.03167>`_.
"""

def __init__(self, dims: Iterable[int], redux: Iterable[int], momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, dims: Iterable[int], redux: Iterable[int], momentum: float = 0.9, eps: float = 1e-5):
"""Creates a BatchNorm module instance.

Args:
Expand Down Expand Up @@ -93,7 +93,7 @@ class BatchNorm0D(BatchNorm):
<https://arxiv.org/abs/1502.03167>`_.
"""

def __init__(self, nin: int, momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, nin: int, momentum: float = 0.9, eps: float = 1e-5):
"""Creates a BatchNorm0D module instance.

Args:
Expand All @@ -115,7 +115,7 @@ class BatchNorm1D(BatchNorm):
<https://arxiv.org/abs/1502.03167>`_.
"""

def __init__(self, nin: int, momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, nin: int, momentum: float = 0.9, eps: float = 1e-5):
"""Creates a BatchNorm1D module instance.

Args:
Expand All @@ -137,7 +137,7 @@ class BatchNorm2D(BatchNorm):
<https://arxiv.org/abs/1502.03167>`_.
"""

def __init__(self, nin: int, momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, nin: int, momentum: float = 0.9, eps: float = 1e-5):
"""Creates a BatchNorm2D module instance.

Args:
Expand Down Expand Up @@ -529,7 +529,7 @@ class SyncedBatchNorm0D(SyncedBatchNorm):
Compared to regular batch norm this usually leads to better accuracy at a slight performance cost.
"""

def __init__(self, nin: int, momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, nin: int, momentum: float = 0.9, eps: float = 1e-5):
"""Creates a SyncedBatchNorm0D module instance.

Args:
Expand All @@ -550,7 +550,7 @@ class SyncedBatchNorm1D(SyncedBatchNorm):
Compared to regular batch norm this usually leads to better accuracy at a slight performance cost.
"""

def __init__(self, nin: int, momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, nin: int, momentum: float = 0.9, eps: float = 1e-5):
"""Creates a SyncedBatchNorm1D module instance.

Args:
Expand All @@ -571,7 +571,7 @@ class SyncedBatchNorm2D(SyncedBatchNorm):
Compared to regular batch norm this usually leads to better accuracy at a slight performance cost.
"""

def __init__(self, nin: int, momentum: float = 0.999, eps: float = 1e-6):
def __init__(self, nin: int, momentum: float = 0.9, eps: float = 1e-5):
"""Creates a SyncedBatchNorm2D module instance.

Args:
Expand Down