jiesutd / LatticeLSTM

Chinese NER using Lattice LSTM. Code for ACL 2018 paper.
1.8k stars 453 forks source link

你好,请问在哪修改max_seq_len #89

Closed luluforever closed 5 years ago

luluforever commented 5 years ago
def forward(self, input, skip_input_list, hidden=None):
    """
        input: variable (batch, seq_len), batch = 1
        skip_input_list: [skip_input, volatile_flag]
        skip_input: three dimension list, with length is seq_len. Each element is a list of matched word id and its length. 
                    example: [[], [[25,13],[2,3]]] 25/13 is word id, 2,3 is word length . 
    """
    volatile_flag = skip_input_list[-1]
    skip_input = skip_input_list[0:-1]

    max_seq_len = input.size(1)
    #max_seq_len = 128

我在latticelstm.py这里直接改报错

jiesutd commented 5 years ago

在这里。 https://github.com/jiesutd/LatticeLSTM/blob/24d17f4270f11d2f75046789d8b67eaa2b907dce/utils/data.py#L21