From b44de0e11281c723ec426f8bec8ca0897ecfe3ff Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 21 Nov 2021 21:34:53 +0100 Subject: Remove VQVAE stuff, did not work... --- text_recognizer/networks/vqvae/norm.py | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 text_recognizer/networks/vqvae/norm.py (limited to 'text_recognizer/networks/vqvae/norm.py') 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) -- cgit v1.2.3-70-g09d2