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

Method forward

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

Source from the content-addressed store, hash-verified

49 initialize_weights(self.seg_head)
50
51 def forward(self, inputs):
52 x = inputs['images']
53 _, _, final_features = self.backbone(x)
54 pred = self.seg_head(final_features)
55 pred = scale_as(pred, x)
56
57 if self.training:
58 assert 'gts' in inputs
59 gts = inputs['gts']
60 loss = self.criterion(pred, gts)
61 return loss
62 else:
63 output_dict = {'pred': pred}
64 return output_dict
65
66
67class ASPP(nn.Module):

Callers

nothing calls this directly

Calls 1

scale_asFunction · 0.90

Tested by

no test coverage detected