Exemple #1
0
 def decode(self, enc):
     enc = enc.repeat(self.out_length, 1, 1)
     h_dec, _ = self.dec_lstm(enc)
     h_dec = h_dec.permute(1, 0, 2)
     fut_pred = self.op(h_dec)
     fut_pred = fut_pred.permute(1, 0, 2)
     fut_pred = outputActivation(fut_pred)
     return fut_pred
Exemple #2
0
 def decode(self, enc):
     enc = enc.repeat(self.out_length, 1, 1)
     h_dec, _ = self.dec_lstm(enc)
     # if h_dec.shape[1]==self.decoder_size:
     #     h_dec = self.bn_dec(h_dec)
     h_dec = h_dec.permute(1, 0, 2)
     fut_pred = self.op(h_dec)
     fut_pred = self.bn_lin(fut_pred)
     fut_pred = fut_pred.permute(1, 0, 2)
     fut_pred = self.dropout(fut_pred)
     fut_pred = outputActivation(fut_pred)
     return fut_pred