From 5c82d3488fefc823f63404e1d238ef18fc31d38f Mon Sep 17 00:00:00 2001 From: thomwolf Date: Tue, 16 Jul 2019 15:45:58 +0200 Subject: [PATCH] indicate default evaluation in breaking changes --- README.md | 5 ++++- docs/source/migration.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4807edc8b9..4967cd68c7 100644 --- a/README.md +++ b/README.md @@ -384,7 +384,10 @@ loss, logits, attentions = outputs ### Serialization -While not a breaking change, the serialization methods have been standardized and you probably should switch to the new method `save_pretrained(save_directory)` if you were using any other seralization method before. +Breaking change: Models are now set in evaluation mode by default when instantiated with the `from_pretrained()` method. +To train them don't forget to set them back in training mode (`model.train()`) to activate the dropout modules. + +Also, while not a breaking change, the serialization methods have been standardized and you probably should switch to the new method `save_pretrained(save_directory)` if you were using any other seralization method before. Here is an example: diff --git a/docs/source/migration.md b/docs/source/migration.md index 440766e42e..fff4807d5c 100644 --- a/docs/source/migration.md +++ b/docs/source/migration.md @@ -35,7 +35,10 @@ loss, logits, attentions = outputs ### Serialization -While not a breaking change, the serialization methods have been standardized and you probably should switch to the new method `save_pretrained(save_directory)` if you were using any other seralization method before. +Breaking change: Models are now set in evaluation mode by default when instantiated with the `from_pretrained()` method. +To train them don't forget to set them back in training mode (`model.train()`) to activate the dropout modules. + +Also, while not a breaking change, the serialization methods have been standardized and you probably should switch to the new method `save_pretrained(save_directory)` if you were using any other seralization method before. Here is an example: