Error in training multilingual NER with own data

The code could look something like this:

tags_dict = dict(model['tag_vocab'])

tokens_batch, proba_batch = model(["I want a camera of 24 MP"]) 

tags_idx_batch = proba_batch.argmax(axis=2)
predicted_tags = [[tags_dict[tag_id]
                   for tag_id in sent_tags_idx]
                  for sent_tags_idx in tags_idx_batch]
1 Like