lonePatient / BERT-NER-Pytorch

Chinese NER(Named Entity Recognition) using BERT(Softmax, CRF, Span)
MIT License
2.05k stars 425 forks source link

In the function "load_and_cache_examples", what's the meaning of "evaluate" ? #57

Open lvjiujin opened 2 years ago

lvjiujin commented 2 years ago

In the function "load_and_cache_examples" of the run_ner_crf.py file, line 323, here the following code:

def load_and_cache_examples(args, task, tokenizer, data_type='train'):
    if args.local_rank not in [-1, 0] and not evaluate:
        torch.distributed.barrier()  #

Notice, here if expression, what's the meaning of 'evaluate' , can you give an explaination?