MCPcopy Create free account
hub / github.com/drinkingcoder/NeuralMarker / forward

Method forward

core/update.py:33–41  ·  view source on GitHub ↗
(self, h, x)

Source from the content-addressed store, hash-verified

31 self.convq = nn.Conv2d(hidden_dim+input_dim, hidden_dim, 3, padding=1)
32
33 def forward(self, h, x):
34 hx = torch.cat([h, x], dim=1)
35
36 z = torch.sigmoid(self.convz(hx))
37 r = torch.sigmoid(self.convr(hx))
38 q = torch.tanh(self.convq(torch.cat([r*h, x], dim=1)))
39
40 h = (1-z) * h + z * q
41 return h
42
43class SepConvGRU(nn.Module):
44 def __init__(self, hidden_dim=128, input_dim=192+128):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected