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

Method __init__

core/update.py:125–138  ·  view source on GitHub ↗
(self, args, hidden_dim=128, input_dim=128)

Source from the content-addressed store, hash-verified

123
124class BasicUpdateBlock(nn.Module):
125 def __init__(self, args, hidden_dim=128, input_dim=128):
126 super(BasicUpdateBlock, self).__init__()
127 self.args = args
128 self.encoder = BasicMotionEncoder(args)
129 self.gru = SepConvGRU(hidden_dim=hidden_dim, input_dim=128+hidden_dim)
130 if self.args.fnet == 'CNN':
131 self.flow_head = FlowHead_cnn(hidden_dim, hidden_dim=256)
132 elif self.args.fnet == 'twins':
133 self.flow_head = FlowHead_twins(hidden_dim, hidden_dim=256)
134
135 self.mask = nn.Sequential(
136 nn.Conv2d(128, 256, 3, padding=1),
137 nn.ReLU(inplace=True),
138 nn.Conv2d(256, 64*9, 1, padding=0))
139
140 def forward(self, net, inp, corr, flow, upsample=True):
141 motion_features = self.encoder(flow, corr)

Callers

nothing calls this directly

Calls 5

BasicMotionEncoderClass · 0.85
SepConvGRUClass · 0.85
FlowHead_cnnClass · 0.85
FlowHead_twinsClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected