Last active
June 3, 2020 15:29
-
-
Save arunm8489/0ed1b22dc294b73842dac5ad1405ca93 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
if module_type == "convolutional" or module_type == "upsample": | |
x = self.module_list[i](x) | |
outputs[i] = x | |
elif module_type == "route": | |
layers = module["layers"] | |
layers = [int(a) for a in layers] | |
if len(layers) == 1: | |
x = outputs[layers[0]] | |
if len(layers) > 1: | |
map1 = outputs[layers[0]] | |
map2 = outputs[layers[1]] | |
x = torch.cat((map1,map2),1) | |
outputs[i] = x | |
elif module_type == "shortcut": | |
from_ = int(module["from"]) | |
# just adding outputs for residual network | |
x = outputs[i-1] + outputs[i+from_] | |
outputs[i] = x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment