Skip to content

Commit

Permalink
Add max center
Browse files Browse the repository at this point in the history
  • Loading branch information
jloveric committed Dec 23, 2023
1 parent 276c8bd commit 1f970cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion language_interpolation/networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
HighOrderTailFocusNetwork,
)
from high_order_layers_torch.positional_embeddings import ClassicSinusoidalEmbedding
from high_order_layers_torch.layers import MaxAbsNormalizationLast, high_order_fc_layers
from high_order_layers_torch.layers import (
MaxAbsNormalizationLast,
high_order_fc_layers,
MaxCenterNormalizationLast,
)
from high_order_layers_torch.networks import initialize_network_polynomial_layers
from torchmetrics import Accuracy
from torch import Tensor
Expand Down Expand Up @@ -51,6 +55,8 @@ def forward(self, x):

if normalizer == "maxabs":
normalization = MaxAbsNormalizationLast
elif normalizer == "maxcenter":
normalization = MaxCenterNormalizationLast
elif normalizer == "layer":
normalization = LazyLayerNormLastDim
elif normalizer == "none":
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ langchain = "^0.0.334"
hydra-core = "^1.3.2"
tensorboard = "^2.15.1"
lion-pytorch = "^0.1.2"
high-order-layers-torch = "^2.4.0"
high-order-layers-torch = "^2.4.1"

[tool.poetry.group.dev.dependencies]
black = "^23.11.0"
Expand Down

0 comments on commit 1f970cf

Please sign in to comment.