MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / forward

Method forward

modules/sequence_modeling.py:71–79  ·  view source on GitHub ↗

input : visual feature [batch_size x T x input_size] output : contextual feature [batch_size x T x output_size]

(self, input)

Source from the content-addressed store, hash-verified

69 self.linear = nn.Linear(hidden_size * 2, output_size)
70
71 def forward(self, input):
72 """
73 input : visual feature [batch_size x T x input_size]
74 output : contextual feature [batch_size x T x output_size]
75 """
76 self.rnn.flatten_parameters()
77 recurrent, _ = self.rnn(input) # batch_size x T x input_size -> batch_size x T x (2*hidden_size)
78 output = self.linear(recurrent) # batch_size x T x output_size
79 return output
80
81class BidirectionalRNN(nn.Module):
82

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected