broccoli-ml 13.0.1__tar.gz → 13.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/PKG-INFO +1 -1
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/transformer.py +0 -13
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/pyproject.toml +1 -1
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/LICENSE +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/README.md +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/__init__.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/activation.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/cnn.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/linear.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/rope.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/tensor.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/utils.py +0 -0
- {broccoli_ml-13.0.1 → broccoli_ml-13.0.3}/broccoli/vit.py +0 -0
|
@@ -387,16 +387,6 @@ class FeedforwardBlock(nn.Module):
|
|
|
387
387
|
self.beta = beta
|
|
388
388
|
self.xglu = activation.__name__.endswith("GLU")
|
|
389
389
|
|
|
390
|
-
if self.residual_path and (output_features < input_features):
|
|
391
|
-
raise ValueError(
|
|
392
|
-
"If the number of output features will be less than "
|
|
393
|
-
"the number of input features, then `residual_path` "
|
|
394
|
-
"should be set to False."
|
|
395
|
-
)
|
|
396
|
-
|
|
397
|
-
if self.post_norm:
|
|
398
|
-
self.layernorm = nn.LayerNorm(output_features)
|
|
399
|
-
|
|
400
390
|
if activation_kwargs is not None:
|
|
401
391
|
self.activation = activation(**activation_kwargs)
|
|
402
392
|
else:
|
|
@@ -474,9 +464,6 @@ class FeedforwardBlock(nn.Module):
|
|
|
474
464
|
return processed
|
|
475
465
|
|
|
476
466
|
def reset_parameters(self):
|
|
477
|
-
if self.post_norm:
|
|
478
|
-
self.layernorm.reset_parameters()
|
|
479
|
-
|
|
480
467
|
# Iterate over the sequential block to reset parameters
|
|
481
468
|
for module in self.process:
|
|
482
469
|
if hasattr(module, "reset_parameters"):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|