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

Method forward

stream/modules/convolution.py:40–48  ·  view source on GitHub ↗

x: [bs, C, T_size] cache: [bs, C, T_size-1]

(self, x, cache)

Source from the content-addressed store, hash-verified

38 bias = bias)
39
40 def forward(self, x, cache):
41 """
42 x: [bs, C, T_size]
43 cache: [bs, C, T_size-1]
44 """
45 inp = torch.cat([cache, x], dim=-1)
46 oup = self.Conv1d(inp)
47 out_cache = inp[..., 1:]
48 return oup, out_cache
49
50
51class StreamConv2d(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected