broccoli-ml 0.29.1__tar.gz → 0.31.0__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-0.29.1 → broccoli_ml-0.31.0}/PKG-INFO +1 -1
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/transformer.py +5 -1
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/vit.py +1 -1
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/pyproject.toml +1 -1
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/LICENSE +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/README.md +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/__init__.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/activation.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/assets/2025_resnet_imagenet_1k_pretrained_state_dict.pkl +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/assets/cifar100_eigenvectors_size_2.pt +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/assets/cifar100_eigenvectors_size_3.pt +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/cnn.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/eigenpatches.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/linear.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/rope.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/tensor.py +0 -0
- {broccoli_ml-0.29.1 → broccoli_ml-0.31.0}/broccoli/utils.py +0 -0
@@ -249,8 +249,10 @@ class FeedforwardBlock(nn.Module):
|
|
249
249
|
|
250
250
|
if raw_input:
|
251
251
|
self.memory_type = SpectralNormLinear
|
252
|
+
self.memory_bias = False
|
252
253
|
else:
|
253
254
|
self.memory_type = nn.Linear
|
255
|
+
self.memory_bias = True
|
254
256
|
|
255
257
|
self.dropout = nn.Dropout(dropout)
|
256
258
|
|
@@ -266,7 +268,9 @@ class FeedforwardBlock(nn.Module):
|
|
266
268
|
linear_module(input_features, self.max_features),
|
267
269
|
self.activation,
|
268
270
|
nn.LayerNorm(ratio * output_features) if normformer else nn.Identity(),
|
269
|
-
self.memory_type(
|
271
|
+
self.memory_type(
|
272
|
+
ratio * output_features, output_features, bias=self.memory_bias
|
273
|
+
),
|
270
274
|
self.dropout,
|
271
275
|
]
|
272
276
|
)
|
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
|
File without changes
|
File without changes
|
File without changes
|