Dropout training
# ❓ Questions & Help

outputs = self.bert(inputs, **kwargs)

pooled_output = outputs[1]

pooled_output = self.dropout(pooled_output, training=kwargs.get("training", False))
logits = self.classifier(pooled_output)
outputs = (logits,) + outputs[2:]  # add hidden states and attention if they are here

I don't see any place where training of dropout are being used in examples, I was puzzled.So can someone tell me about this?


Hi @weiarqq, 

Where does the code come from? What is the application? What do you mean by "training of dropout"? the `training=kwargs.get("training", False)` is a flag for pytorch's dropout to switch it on and off depending on whether you are in training module "training=True" or not.