Are dropout layers activated when calling model.generate()?
Hi, I’m curious about whether the dropout is activated when we callmodel.generate()?For example, if the model is a T5 model loaded bymodel = T5ForConditionalGeneration.from_pretrained('google-t5/t5-base')By default, the dropout layers in T5 model hasp=0.1. I wonder if anyone knows whether the dropout layers are activated when we usemodel.generate()to generate outputs?Or maybemodel.eval()is called somewhere insidemodel.generate()?
2024-09-07T18:45:57Z
Hi,No dropout is deactivated sincefrom_pretrainedputs a model in evaluation mode by default (i.e.model.eval()is called on the model).
2024-09-08T19:27:35Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.