broccoli-ml 10.0.0__tar.gz → 10.0.1__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-10.0.0 → broccoli_ml-10.0.1}/PKG-INFO +1 -1
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/transformer.py +2 -2
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/pyproject.toml +1 -1
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/LICENSE +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/README.md +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/__init__.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/activation.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/cnn.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/linear.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/rope.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/tensor.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/utils.py +0 -0
- {broccoli_ml-10.0.0 → broccoli_ml-10.0.1}/broccoli/vit.py +0 -0
|
@@ -24,10 +24,10 @@ except ImportError:
|
|
|
24
24
|
class LayerScale(nn.Module):
|
|
25
25
|
def __init__(self, dim, init_values=1e-4):
|
|
26
26
|
super().__init__()
|
|
27
|
-
self.
|
|
27
|
+
self.nondecay_scale = nn.Parameter(init_values * torch.ones(dim))
|
|
28
28
|
|
|
29
29
|
def forward(self, x):
|
|
30
|
-
return x * self.
|
|
30
|
+
return x * self.nondecay_scale
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
def drop_path(
|
|
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
|