super initialization
Browse files
model_utils/efficientnet_config.py
CHANGED
@@ -266,7 +266,7 @@ class EfficientNetConfig(PretrainedConfig):
|
|
266 |
norm_layer (Optional[Callable[..., nn.Module]]): Module specifying the normalization layer to use
|
267 |
last_channel (int): The number of channels on the penultimate layer
|
268 |
"""
|
269 |
-
super().__init__()
|
270 |
# _log_api_usage_once(self)
|
271 |
|
272 |
inverted_residual_setting, last_channel = _efficientnet_conf(
|
@@ -369,6 +369,8 @@ class EfficientNetConfig(PretrainedConfig):
|
|
369 |
init_range = 1.0 / math.sqrt(m.out_features)
|
370 |
nn.init.uniform_(m.weight, -init_range, init_range)
|
371 |
nn.init.zeros_(m.bias)
|
|
|
|
|
372 |
|
373 |
def _forward_impl(self, x: Tensor) -> Tensor:
|
374 |
x = self.features(x)
|
|
|
266 |
norm_layer (Optional[Callable[..., nn.Module]]): Module specifying the normalization layer to use
|
267 |
last_channel (int): The number of channels on the penultimate layer
|
268 |
"""
|
269 |
+
# super().__init__()
|
270 |
# _log_api_usage_once(self)
|
271 |
|
272 |
inverted_residual_setting, last_channel = _efficientnet_conf(
|
|
|
369 |
init_range = 1.0 / math.sqrt(m.out_features)
|
370 |
nn.init.uniform_(m.weight, -init_range, init_range)
|
371 |
nn.init.zeros_(m.bias)
|
372 |
+
|
373 |
+
super().__init__(**kwargs)
|
374 |
|
375 |
def _forward_impl(self, x: Tensor) -> Tensor:
|
376 |
x = self.features(x)
|