broccoli-ml 13.0.3__py3-none-any.whl → 13.0.5__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
@@ -416,7 +416,7 @@ class ViTEncoder(nn.Module):
416
416
  f"N C {spatial_dim_names} -> N ({spatial_dim_names}) C"
417
417
  ),
418
418
  self.pooling_channels_padding,
419
- nn.LayerNorm(),
419
+ nn.LayerNorm(transformer_embedding_size),
420
420
  ]
421
421
  )
422
422
 
@@ -433,9 +433,11 @@ class ViTEncoder(nn.Module):
433
433
  return self.transformer.attention_logits(x)
434
434
 
435
435
  def reset_parameters(self):
436
- for module in self.encoder:
436
+ for module in self.preprocess:
437
437
  if hasattr(module, "reset_parameters"):
438
438
  module.reset_parameters()
439
+ self.initial_ff.reset_parameters()
440
+ self.transformer.reset_parameters()
439
441
 
440
442
 
441
443
  class ViT(nn.Module):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: broccoli-ml
3
- Version: 13.0.3
3
+ Version: 13.0.5
4
4
  Summary: Some useful Pytorch models, circa 2025
5
5
  License: MIT
6
6
  Author: Nicholas Bailey
@@ -6,8 +6,8 @@ broccoli/rope.py,sha256=GRqApBNmYCFaDak0WL1xE_BC5CTTYKQU_PBdeTcQcjc,12557
6
6
  broccoli/tensor.py,sha256=um8mrxkYbvNDo-QvHlmJm8Aw6qcngOlUZPoAk_PMReA,4480
7
7
  broccoli/transformer.py,sha256=-rVhSl5yWDbEbjLysSpjiEy0h01E33TGdtgBnd-zRgA,27952
8
8
  broccoli/utils.py,sha256=oOWzn6dJ5nC_9r4zq0emmfmaYACJXJNFS48AOpW2jqc,358
9
- broccoli/vit.py,sha256=jd4e6MjL2JKB8ynSQssWRh6Hs36RuLj4uWyUNVhIMUY,22472
10
- broccoli_ml-13.0.3.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
11
- broccoli_ml-13.0.3.dist-info/METADATA,sha256=rO1pmR4ReTeS68WFq4LyM40GENF98YHpszAzf1L4M2w,1369
12
- broccoli_ml-13.0.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
- broccoli_ml-13.0.3.dist-info/RECORD,,
9
+ broccoli/vit.py,sha256=SYAHGuGVZRa-zYCLK5siKdUauDgHtMYUmQ6W2tUIqKA,22588
10
+ broccoli_ml-13.0.5.dist-info/LICENSE,sha256=0BAzJE5BqQ7Iixp_AFdB2W1uO-HCRX-Qfun8PHt6yVM,1073
11
+ broccoli_ml-13.0.5.dist-info/METADATA,sha256=JM7ILFgCPGW7lkP_vWfet9KdNMz6xpRcNlChvzQA5xU,1369
12
+ broccoli_ml-13.0.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
13
+ broccoli_ml-13.0.5.dist-info/RECORD,,