MCPcopy Create free account
hub / github.com/QWTforGithub/T2LDM / SequentialTuple

Class SequentialTuple

timm/models/pit.py:66–74  ·  view source on GitHub ↗

This module exists to work around torchscript typing issues list -> list

Source from the content-addressed store, hash-verified

64
65
66class SequentialTuple(nn.Sequential):
67 """ This module exists to work around torchscript typing issues list -> list"""
68 def __init__(self, *args):
69 super(SequentialTuple, self).__init__(*args)
70
71 def forward(self, x: Tuple[torch.Tensor, torch.Tensor]) -> Tuple[torch.Tensor, torch.Tensor]:
72 for module in self:
73 x = module(x)
74 return x
75
76
77class Transformer(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected