Created
March 24, 2021 00:25
-
-
Save J3698/e14e35baa4f04896d87ef84294f9388b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
features_list = [] | |
for layer in features: | |
features_list.append(layer) | |
if isinstance(layer, nn.Conv2d): | |
features_list.append(nn.BatchNorm2d(layer.out_channels)) | |
del features_list[-1] | |
self.features = nn.Sequential(*features_list) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment