MCPcopy Create free account
hub / github.com/Modulus-Labs/RockyBot / __init__

Method __init__

pytorch-model/models.py:149–162  ·  view source on GitHub ↗
(self, dataset_ref, c_dim=256)

Source from the content-addressed store, hash-verified

147 output, (hn, cn) = rnn(input, (h0, c0))
148 """
149 def __init__(self, dataset_ref, c_dim=256):
150
151 super(Simple_LSTM_Classifier, self).__init__()
152
153 # --- Save the dims ---
154 self.in_dim = dataset_ref.get_input_dim()
155 self.out_dim = dataset_ref.get_output_dim()
156 self.c_dim = c_dim
157
158 print(self.in_dim, self.out_dim, self.c_dim)
159
160 # --- Layers ---
161 self.lstm = nn.LSTM(input_size=self.in_dim, hidden_size=self.c_dim)
162 self.output_projection = nn.Linear(in_features=self.c_dim, out_features=self.out_dim)
163
164 def forward(self, x):
165 # --- x \in (N, L, H_dim) ---

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45
get_input_dimMethod · 0.45
get_output_dimMethod · 0.45

Tested by

no test coverage detected