mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Enable fixed fanout calc in EfficientNet/MobileNetV3 weight init by default. Fix #84
This commit is contained in:
parent
27b3680d49
commit
9fee316752
@ -359,15 +359,13 @@ class EfficientNetBuilder:
|
||||
return stages
|
||||
|
||||
|
||||
def _init_weight_goog(m, n='', fix_group_fanout=False):
|
||||
def _init_weight_goog(m, n='', fix_group_fanout=True):
|
||||
""" Weight initialization as per Tensorflow official implementations.
|
||||
|
||||
Args:
|
||||
m (nn.Module): module to init
|
||||
n (str): module name
|
||||
fix_group_fanout (bool): enable correct fanout calculation w/ group convs
|
||||
|
||||
FIXME change fix_group_fanout to default to True if experiments show better training results
|
||||
fix_group_fanout (bool): enable correct (matching Tensorflow TPU impl) fanout calculation w/ group convs
|
||||
|
||||
Handles layers in EfficientNet, EfficientNet-CondConv, MixNet, MnasNet, MobileNetV3, etc:
|
||||
* https://github.com/tensorflow/tpu/blob/master/models/official/mnasnet/mnasnet_model.py
|
||||
|
Loading…
x
Reference in New Issue
Block a user