MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / forward

Method forward

preprocess/auxiliary/TransNetV2.py:127–151  ·  view source on GitHub ↗
(self, inputs)

Source from the content-addressed store, hash-verified

125 self.stochastic_depth_drop_prob = stochastic_depth_drop_prob
126
127 def forward(self, inputs):
128 x = inputs
129 shortcut = None
130
131 for block in self.DDCNN:
132 x = block(x)
133 if shortcut is None:
134 shortcut = x
135
136 x = functional.relu(x)
137
138 if self.shortcut is not None:
139 if self.stochastic_depth_drop_prob != 0.:
140 if self.training:
141 if random.random() < self.stochastic_depth_drop_prob:
142 x = shortcut
143 else:
144 x = x + shortcut
145 else:
146 x = (1 - self.stochastic_depth_drop_prob) * x + shortcut
147 else:
148 x += shortcut
149
150 x = self.pool(x)
151 return x
152
153
154class DilatedDCNNV2(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected