minor fixes

This commit is contained in:
jinzr 2023-10-24 02:01:18 +08:00
parent 92ef561ff7
commit 84644d04c4
2 changed files with 2 additions and 0 deletions

View File

@ -99,6 +99,7 @@ class Decoder(nn.Module):
# To avoid `RuntimeError: Module 'Decoder' has no attribute 'conv'` # To avoid `RuntimeError: Module 'Decoder' has no attribute 'conv'`
# when inference with torch.jit.script and context_size == 1 # when inference with torch.jit.script and context_size == 1
self.conv = nn.Identity() self.conv = nn.Identity()
self.balancer2 = nn.Identity()
def forward(self, y: torch.Tensor, need_pad: bool = True) -> torch.Tensor: def forward(self, y: torch.Tensor, need_pad: bool = True) -> torch.Tensor:
""" """

View File

@ -98,6 +98,7 @@ class Decoder(nn.Module):
# To avoid `RuntimeError: Module 'Decoder' has no attribute 'conv'` # To avoid `RuntimeError: Module 'Decoder' has no attribute 'conv'`
# when inference with torch.jit.script and context_size == 1 # when inference with torch.jit.script and context_size == 1
self.conv = nn.Identity() self.conv = nn.Identity()
self.balancer2 = nn.Identity()
def forward(self, y: torch.Tensor, need_pad: bool = True) -> torch.Tensor: def forward(self, y: torch.Tensor, need_pad: bool = True) -> torch.Tensor:
""" """