MCPcopy Create free account
hub / github.com/NVIDIA/semantic-segmentation / forward

Method forward

network/basic.py:84–101  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

82 initialize_weights(self.final, self.bot_aspp, self.aspp)
83
84 def forward(self, inputs):
85 x = inputs['images']
86 x_size = x.size()
87
88 _, _, final_features = self.backbone(x)
89 aspp = self.aspp(final_features)
90 aspp = self.bot_aspp(aspp)
91 pred = self.final(aspp)
92 pred = Upsample(pred, x_size[2:])
93
94 if self.training:
95 assert 'gts' in inputs
96 gts = inputs['gts']
97 loss = self.criterion(pred, gts)
98 return loss
99 else:
100 output_dict = {'pred': pred}
101 return output_dict
102
103
104def HRNet(num_classes, criterion, s2s4=None):

Callers

nothing calls this directly

Calls 1

UpsampleFunction · 0.90

Tested by

no test coverage detected