

TITLE
Load from a TF 1.0 checkpoint in modeling_tf_utils.py

COMMENTS
4

REACTIONS
+1: 0
-1: 0
laugh: 0
hooray: 0
heart: 0
rocket: 0
eyes: 0

BODY
In the file modeling_utils.py, we can load a TF 1.0 checkpoint as is indicated in this [line](https://github.com/huggingface/transformers/blob/fb650df8590f796663226132482d09da5b0fb613/src/transformers/modeling_utils.py#L930). However, in the file modeling_tf_utils.py, which is the same version for TF, we can not load models from TF 1.0, and it says expecifically that you can as:
`            >>> model = BertModel.from_pretrained('./tf_model/my_tf_checkpoint.ckpt.index', from_tf=True, config=config)`
But there is no _if_ for
`os.path.isfile(os.path.join(pretrained_model_name_or_path, TF_WEIGHTS_NAME + ".index"))`

