broccoli-ml 1.2.1__py3-none-any.whl → 1.2.2__py3-none-any.whl

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/vit.py CHANGED
@@ -90,8 +90,22 @@ class SequencePoolClassificationHead(ClassificationHead):
90
90
  as a generalisation of average pooling.
91
91
  """
92
92
 
93
- def __init__(self, d_model, linear_module, out_dim, batch_norm=True):
94
- super().__init__(d_model, linear_module, out_dim, batch_norm_logits=batch_norm)
93
+ def __init__(
94
+ self,
95
+ d_model,
96
+ n_classes,
97
+ linear_module=nn.Linear,
98
+ logit_projection_layer=nn.Linear,
99
+ batch_norm_logits=True,
100
+ ):
101
+ super().__init__(
102
+ d_model,
103
+ n_classes,
104
+ linear_module=linear_module,
105
+ logit_projection_layer=logit_projection_layer,
106
+ batch_norm_logits=batch_norm_logits,
107
+ )
108
+
95
109
  self.summarize = SequencePool(d_model, linear_module)
96
110
  # Rebuild the classification process with the correct summary module:
97
111
  self.classification_process = nn.Sequential(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: broccoli-ml
3
- Version: 1.2.1
3
+ Version: 1.2.2
4
4
  Summary: Some useful Pytorch models, circa 2025
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -10,8 +10,8 @@ broccoli/rope.py,sha256=hw7kBPNR9GQXj4GxyIAffsGKPfcTPOFh8Bc7oEHtaZY,12108
10
10
  broccoli/tensor.py,sha256=um8mrxkYbvNDo-QvHlmJm8Aw6qcngOlUZPoAk_PMReA,4480
11
11
  broccoli/transformer.py,sha256=Dx8X4L5YExaXShvx9pDnUNy9sf8rW_LHuh1spKVIK90,18539
12
12
  broccoli/utils.py,sha256=htq_hOsdhUhL0nJi9WkKiEYOjEoWqFpK5X49PtgTf-0,299
13
- broccoli/vit.py,sha256=9dfOPO7y-o96OYpy_ancH4-Y2_Y62fqgzJvI3-86W_o,18471
14
- broccoli_ml-1.2.1.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
15
- broccoli_ml-1.2.1.dist-info/METADATA,sha256=2TpRTbTMOY3CiNKiC1_t1d9oWEf_Dp3dOUEJ913Pfe0,1256
16
- broccoli_ml-1.2.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
- broccoli_ml-1.2.1.dist-info/RECORD,,
13
+ broccoli/vit.py,sha256=iEW8XTTu0CexNtRuCDOMjX08XG8-VkK9A7RQ18ZvMW4,18721
14
+ broccoli_ml-1.2.2.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
15
+ broccoli_ml-1.2.2.dist-info/METADATA,sha256=X0T99EOMcTLP8JO5uPGfN8scuStwpnNMSD5r-Fb9q70,1256
16
+ broccoli_ml-1.2.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
17
+ broccoli_ml-1.2.2.dist-info/RECORD,,