MCPcopy Create free account
hub / github.com/Sirwenhao/Deep-Learning-Notes / _Transition

Class _Transition

CV/Pytorch_classification/DenseNet/model.py:75–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73 features.append(new_features)
74 return torch.cat(features, 1)
75class _Transition(nn.Sequential):
76 def __init__(self, input_c, output_c):
77 super(_Transition, self).__init__()
78 self.add_module("norm", nn.BatchNorm2d(input_c))
79 self.add_module("relu", nn.ReLU(inplace=True))
80 self.add_module("conv", nn.Conv2d(input_c, output_c, kernel_size=1, stride=1, bias=False))
81 self.add_module("pool", nn.AvgPool2d(kernel_size=2, stride=2))
82
83class DenseNet(nn.Module):
84 """

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected