broccoli-ml 0.8.1__tar.gz → 0.9.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: broccoli-ml
3
- Version: 0.8.1
3
+ Version: 0.9.0
4
4
  Summary: Some useful Pytorch models, circa 2025
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -233,6 +233,7 @@ class FeedforwardLayer(nn.Module):
233
233
  output_features,
234
234
  activation=nn.ReLU,
235
235
  activation_kwargs=None,
236
+ layer_norm=True,
236
237
  dropout=0.0,
237
238
  linear_module=nn.Linear,
238
239
  ):
@@ -247,7 +248,7 @@ class FeedforwardLayer(nn.Module):
247
248
 
248
249
  self.process = nn.Sequential(
249
250
  *[
250
- nn.LayerNorm(input_features),
251
+ nn.LayerNorm(input_features) if layer_norm else nn.Identity(),
251
252
  linear_module(
252
253
  input_features,
253
254
  (
@@ -261,6 +261,7 @@ class ViTEncoder(nn.Module):
261
261
  transformer_embedding_size,
262
262
  activation=transformer_activation,
263
263
  activation_kwargs=transformer_activation_kwargs,
264
+ layer_norm=False, # rely on initial batch_norm
264
265
  dropout=transformer_mlp_dropout,
265
266
  linear_module=linear_module,
266
267
  )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "broccoli-ml"
3
- version = "0.8.1"
3
+ version = "0.9.0"
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