broccoli-ml 0.1.39__tar.gz → 0.1.41__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.1.39 → broccoli_ml-0.1.41}/PKG-INFO +1 -1
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/vit.py +11 -4
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/pyproject.toml +1 -1
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/LICENSE +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/README.md +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/__init__.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/activation.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/assets/2025_resnet_imagenet_1k_pretrained_state_dict.pkl +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/assets/cifar100_eigenvectors_size_2.pt +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/assets/cifar100_eigenvectors_size_3.pt +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/cnn.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/eigenpatches.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/linear.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/rope.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/tensor.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/transformer.py +0 -0
- {broccoli_ml-0.1.39 → broccoli_ml-0.1.41}/broccoli/utils.py +0 -0
@@ -156,9 +156,13 @@ class CCTEncoder(nn.Module):
|
|
156
156
|
)
|
157
157
|
|
158
158
|
elif conv_pooling_type == "concat":
|
159
|
-
|
160
|
-
|
161
|
-
|
159
|
+
|
160
|
+
if transformer_activation_kwargs is not None:
|
161
|
+
self.concatpool_activation = transformer_activation(
|
162
|
+
**transformer_activation_kwargs
|
163
|
+
)
|
164
|
+
else:
|
165
|
+
self.concatpool_activation = transformer_activation()
|
162
166
|
|
163
167
|
concatpool_out_channels = conv_pooling_kernel_size**2 * conv_out_channels
|
164
168
|
|
@@ -195,7 +199,10 @@ class CCTEncoder(nn.Module):
|
|
195
199
|
),
|
196
200
|
),
|
197
201
|
self.concatpool_activation,
|
198
|
-
nn.Linear(
|
202
|
+
nn.Linear(
|
203
|
+
transformer_embedding_size * transformer_mlp_ratio,
|
204
|
+
transformer_embedding_size,
|
205
|
+
),
|
199
206
|
]
|
200
207
|
)
|
201
208
|
|
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
|
File without changes
|