MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / SmallUpdateBlock

Class SmallUpdateBlock

core/update.py:99–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 return torch.cat([out, flow], dim=1)
98
99class SmallUpdateBlock(nn.Module):
100 def __init__(self, args, hidden_dim=96):
101 super(SmallUpdateBlock, self).__init__()
102 self.encoder = SmallMotionEncoder(args)
103 self.gru = ConvGRU(hidden_dim=hidden_dim, input_dim=82+64)
104 self.flow_head = FlowHead(hidden_dim, hidden_dim=128)
105
106 def forward(self, net, inp, corr, flow):
107 motion_features = self.encoder(flow, corr)
108 inp = torch.cat([inp, motion_features], dim=1)
109 net = self.gru(net, inp)
110 delta_flow = self.flow_head(net)
111
112 return net, None, delta_flow
113
114class BasicUpdateBlock(nn.Module):
115 def __init__(self, args, hidden_dim=128, input_dim=128):

Callers 1

__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected