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

Method __init__

modules/sequence_modeling.py:41–46  ·  view source on GitHub ↗
(self, input_size, hidden_size, output_size)

Source from the content-addressed store, hash-verified

39class BidirectionalLSTM(nn.Module):
40
41 def __init__(self, input_size, hidden_size, output_size):
42 super(BidirectionalLSTM, self).__init__()
43 self.rnn = nn.LSTM(input_size, hidden_size, bidirectional=True, batch_first=True)
44 self.linear = nn.Linear(hidden_size * 2, output_size)
45 # self.h0 = torch.randn(2, 1, hidden_size).cuda()
46 # self.c0 = torch.randn(2, 1, hidden_size).cuda()
47
48 def forward(self, input):
49 """

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected