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

Method forward

network/xception.py:201–256  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

199 self._load_pretrained_model()
200
201 def forward(self, x):
202 # Entry flow
203 x = self.conv1(x)
204 x = self.bn1(x)
205 x = self.relu(x)
206
207 x = self.conv2(x)
208 x = self.bn2(x)
209 str2 = self.relu(x)
210 # s2
211 str4 = self.block1(str2)
212 str4 = self.relu(str4)
213 # s4
214 x = self.block2(str4)
215 str8 = self.block3(x)
216 # s8
217
218 if self.output_stride == 8:
219 low_level_feat, high_level_feat = str2, str4
220 else:
221 low_level_feat, high_level_feat = str4, str8
222
223 # Middle flow
224 x = self.block4(str8)
225 x = self.block5(x)
226 x = self.block6(x)
227 x = self.block7(x)
228 x = self.block8(x)
229 x = self.block9(x)
230 x = self.block10(x)
231 x = self.block11(x)
232 x = self.block12(x)
233 x = self.block13(x)
234 x = self.block14(x)
235 x = self.block15(x)
236 x = self.block16(x)
237 x = self.block17(x)
238 x = self.block18(x)
239 x = self.block19(x)
240
241 # Exit flow
242 x = self.block20(x)
243 x = self.relu(x)
244 x = self.conv3(x)
245 x = self.bn3(x)
246 x = self.relu(x)
247
248 x = self.conv4(x)
249 x = self.bn4(x)
250 x = self.relu(x)
251
252 x = self.conv5(x)
253 x = self.bn5(x)
254 x = self.relu(x)
255
256 return low_level_feat, high_level_feat, x
257
258 def _init_weight(self):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected