| 129 | |
| 130 | |
| 131 | class build_WideResNet: |
| 132 | def __init__(self, first_stride=1, depth=28, widen_factor=2, bn_momentum=0.01, leaky_slope=0.0, dropRate=0.0, |
| 133 | use_embed=False, is_remix=False): |
| 134 | self.first_stride = first_stride |
| 135 | self.depth = depth |
| 136 | self.widen_factor = widen_factor |
| 137 | self.bn_momentum = bn_momentum |
| 138 | self.dropRate = dropRate |
| 139 | self.leaky_slope = leaky_slope |
| 140 | self.use_embed = use_embed |
| 141 | self.is_remix = is_remix |
| 142 | |
| 143 | def build(self, num_classes): |
| 144 | return WideResNet( |
| 145 | first_stride=self.first_stride, |
| 146 | depth=self.depth, |
| 147 | num_classes=num_classes, |
| 148 | widen_factor=self.widen_factor, |
| 149 | drop_rate=self.dropRate, |
| 150 | is_remix=self.is_remix, |
| 151 | ) |
| 152 | |
| 153 | |
| 154 | if __name__ == '__main__': |
no outgoing calls
no test coverage detected