MCPcopy Create free account
hub / github.com/davda54/sam / Block

Class Block

example/model/wide_res_net.py:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46class Block(nn.Module):
47 def __init__(self, in_channels: int, out_channels: int, stride: int, depth: int, dropout: float):
48 super(Block, self).__init__()
49 self.block = nn.Sequential(
50 DownsampleUnit(in_channels, out_channels, stride, dropout),
51 *(BasicUnit(out_channels, dropout) for _ in range(depth))
52 )
53
54 def forward(self, x):
55 return self.block(x)
56
57
58class WideResNet(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected