_, final_hid = self.rnn_model(x, hid_0)
final_hid.squeeze_(dim=0)
// return tensor if single tail, else list of tail tensors
if len(self.model_tails) == 1:
return self.model_tails[0](final_hid)
else:
outs = []
After Change
_output, (h_n, c_n) = self.rnn_model(x)
else:
_output, h_n = self.rnn_model(x)
hid_x = h_n[-1:].squeeze_(dim=0) // get final time-layer
// return tensor if single tail, else list of tail tensors
if hasattr(self, "model_tails"):
outs = []