huggingface / transfer-learning-conv-ai

🦄 State-of-the-Art Conversational AI with Transfer Learning
MIT License
1.74k stars 430 forks source link

the meaning of code #130

Open steveluo01 opened 1 year ago

steveluo01 commented 1 year ago

for utterance in dialog["utterances"]: history = utterance["history"][-(2*args.max_history+1):] for j, candidate in enumerate(utterance["candidates"][-num_candidates:]): lm_labels = bool(j == num_candidates-1) instance = build_input_from_segments(persona, history, candidate, tokenizer, lm_labels)

Hello, I am new to transfer, how to understand these sentences?