diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-11-21 21:34:53 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-11-21 21:34:53 +0100 |
commit | b44de0e11281c723ec426f8bec8ca0897ecfe3ff (patch) | |
tree | 998841a3a681d3dedfbe8470c1b8544b4dcbe7a2 /text_recognizer/networks/vqvae/norm.py | |
parent | 3b2fb0fd977a6aff4dcf88e1a0f99faac51e05b1 (diff) |
Remove VQVAE stuff, did not work...
Diffstat (limited to 'text_recognizer/networks/vqvae/norm.py')
-rw-r--r-- | text_recognizer/networks/vqvae/norm.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/text_recognizer/networks/vqvae/norm.py b/text_recognizer/networks/vqvae/norm.py deleted file mode 100644 index d73f9f8..0000000 --- a/text_recognizer/networks/vqvae/norm.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Normalizer block.""" -import attr -from torch import nn, Tensor - - -@attr.s(eq=False) -class Normalize(nn.Module): - num_channels: int = attr.ib() - num_groups: int = attr.ib(default=32) - norm: nn.GroupNorm = attr.ib(init=False) - - def __attrs_post_init__(self) -> None: - """Post init configuration.""" - super().__init__() - self.norm = nn.GroupNorm( - num_groups=self.num_groups, - num_channels=self.num_channels, - eps=1.0e-6, - affine=True, - ) - - def forward(self, x: Tensor) -> Tensor: - """Applies group normalization.""" - return self.norm(x) |