broccoli-ml 1.2.1__tar.gz → 1.2.2__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.
@@ -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
@@ -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
  [project]
2
2
  name = "broccoli-ml"
3
- version = "1.2.1"
3
+ version = "1.2.2"
4
4
  description = "Some useful Pytorch models, circa 2025"
5
5
  authors = [
6
6
  {name = "Nicholas Bailey"}
File without changes
File without changes
File without changes