MCPcopy Create free account
hub / github.com/ChinaYi/ASFormer / forward

Method forward

model.py:263–281  ·  view source on GitHub ↗

:param x: (N, C, L) :param mask: :return:

(self, x, mask)

Source from the content-addressed store, hash-verified

261 self.channel_masking_rate = channel_masking_rate
262
263 def forward(self, x, mask):
264 '''
265 :param x: (N, C, L)
266 :param mask:
267 :return:
268 '''
269
270 if self.channel_masking_rate > 0:
271 x = x.unsqueeze(2)
272 x = self.dropout(x)
273 x = x.squeeze(2)
274
275 feature = self.conv_1x1(x)
276 for layer in self.layers:
277 feature = layer(feature, None, mask)
278
279 out = self.conv_out(feature) * mask[:, 0:1, :]
280
281 return out, feature
282
283
284class Decoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected