fixed loading pre-trained tokenizer from directory

This commit is contained in:
thomwolf
2018-11-30 14:09:06 +01:00
parent 532a81d3d6
commit d6f06c03f4
2 changed files with 15 additions and 12 deletions

View File

@@ -478,7 +478,7 @@ class PreTrainedBertModel(nn.Module):
"associated to this path or url.".format(
pretrained_model_name,
', '.join(PRETRAINED_MODEL_ARCHIVE_MAP.keys()),
pretrained_model_name))
archive_file))
return None
if resolved_archive_file == archive_file:
logger.info("loading archive file {}".format(archive_file))