MCPcopy Create free account
hub / github.com/Xiaobin-Rong/gtcrn / forward

Method forward

stream/gtcrn_stream.py:250–265  ·  view source on GitHub ↗

x: (B,C,T,F) conv_cache: (B,C, (kT-1)*8, F) tra_cache: (3,1,B,C)

(self, x, conv_cache, tra_cache)

Source from the content-addressed store, hash-verified

248 ])
249
250 def forward(self, x, conv_cache, tra_cache):
251 """
252 x: (B,C,T,F)
253 conv_cache: (B,C, (kT-1)*8, F)
254 tra_cache: (3,1,B,C)
255 """
256 en_outs = []
257 for i in range(2):
258 x = self.en_convs[i](x)
259 en_outs.append(x)
260
261 x, conv_cache[:,:, :2, :], tra_cache[0] = self.en_convs[2](x, conv_cache[:,:, :2, :], tra_cache[0]); en_outs.append(x)
262 x, conv_cache[:,:, 2:6, :], tra_cache[1] = self.en_convs[3](x, conv_cache[:,:, 2:6, :], tra_cache[1]); en_outs.append(x)
263 x, conv_cache[:,:, 6:16, :], tra_cache[2] = self.en_convs[4](x, conv_cache[:,:, 6:16, :], tra_cache[2]); en_outs.append(x)
264
265 return x, en_outs, conv_cache, tra_cache
266
267
268class StreamDecoder(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected