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

Class SmallUpdateBlock

core/update.py:109–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107 return torch.cat([out, flow], dim=1)
108
109class SmallUpdateBlock(nn.Module):
110 def __init__(self, args, hidden_dim=96):
111 super(SmallUpdateBlock, self).__init__()
112 self.encoder = SmallMotionEncoder(args)
113 self.gru = ConvGRU(hidden_dim=hidden_dim, input_dim=82+64)
114 self.flow_head = FlowHead(hidden_dim, hidden_dim=128)
115
116 def forward(self, net, inp, corr, flow):
117 motion_features = self.encoder(flow, corr)
118 inp = torch.cat([inp, motion_features], dim=1)
119 net = self.gru(net, inp)
120 delta_flow = self.flow_head(net)
121
122 return net, None, delta_flow
123
124class BasicUpdateBlock(nn.Module):
125 def __init__(self, args, hidden_dim=128, input_dim=128):

Callers 2

__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected