broccoli-ml 13.0.3__tar.gz → 13.0.5__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-13.0.3 → broccoli_ml-13.0.5}/PKG-INFO +1 -1
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/vit.py +4 -2
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/pyproject.toml +1 -1
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/LICENSE +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/README.md +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/__init__.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/activation.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/cnn.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/linear.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/rope.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/tensor.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/transformer.py +0 -0
- {broccoli_ml-13.0.3 → broccoli_ml-13.0.5}/broccoli/utils.py +0 -0
|
@@ -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.
|
|
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):
|
|
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
|