Skip to content

做ner task时,lstm_crf.py有bug编不过 #2

Description

@Mrxiexianzhao

`class LstmCrfTagger(Model):
"""
word_embedding + bilstm + crf
"""
def init(self, label_nums, vocab_size, input_dim,
hidden_size, num_layers, use_crf=True,
bidirection=True, batch_first=True, device=None,
dropout=0.0, averge_batch_loss=True, **kwargs):

    super(LstmCrfTagger, self).__init__(input_dim, vocab_size, **kwargs)` 

return globals()[model_conf["encoder_cls"]](**model_conf["encoder_params"], **extra),
File "D:\soft\NLP_Frame\algorithm\models\lstm_crf.py", line 29, in init
super(LstmCrfTagger, self).init(input_dim, vocab_size, **kwargs)
TypeError: init() takes 1 positional argument but 3 were given

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions