def __init__(self, options): super(Decoder_deRNNG, self).__init__() # stack-LSTM self.stack_init = Initializer(options['stack_init']) self.stack = LSTM(options['stack']) # history-LSTM self.history_init = Initializer(options['history_init']) self.history = LSTM(options['history']) # buffer-LSTM self.buffer_init = Initializer(options['buffer_init']) self.buffer = MaskLSTM(options['buffer']) # Attention self.attention = Attention(options['attention']) # Prediction self.hidden_act = Linear(options['hidden_act']) self.hidden_tok = Linear(options['hidden_tok']) self.predict_act = Linear(options['predict_act']) self.predict_tok = Linear(options['predict_tok']) # Copy Mechanism self.switcher_copy = Linear(options['switcher_copy'])
def __init__(self, options): super(Decoder_FlatLVT, self).__init__() self.init = Initializer(options['init']) self.main = LSTM(options['main']) self.attention = Attention(options['attention']) self.hidden = Linear(options['hidden']) self.predict = Linear(options['predict']) self.switcher_copy = Linear(options['switcher_copy'])
def __init__(self, options): super(TreeNode_De, self).__init__() self.layer = Linear(options)
def __init__(self, options): super(Last_Two, self).__init__() self.birectional = options['birectional'] self.n_dim = options['n_in'] self.layer_1 = Linear(options) self.layer_2 = Linear(options)
def __init__(self, options): super(Mean_Two, self).__init__() self.layer_1 = Linear(options) self.layer_2 = Linear(options)
def __init__(self, options): super(Mean_One, self).__init__() self.layer = Linear(options)
def __init__(self, options): super(Decoder_Flat, self).__init__() self.init = Initializer(options['init']) self.main = LSTM(options['main']) self.predict = Linear(options['predict'])