Update davit.py

pull/1630/head
Fredo Guan 3 years ago
parent f5da145a76
commit ba70ebc804

@ -35,6 +35,11 @@ __all__ = ['DaViT']
class MySequential(nn.Sequential): class MySequential(nn.Sequential):
def __init__(*args, **kwargs):
super(MySequential, self).__init__(*args, **kwargs)
def forward(self, inputs : Tensor, size : Tuple[int, int]): def forward(self, inputs : Tensor, size : Tuple[int, int]):
for module in self._modules.values(): for module in self._modules.values():
inputs = module(inputs, size) inputs = module(inputs, size)

Loading…
Cancel
Save