C5W4_lab2 Named-Entity Recognition

I am trying to run the lab 2 of C5W4 offline on a jupyter notebook (it runs with no problem when I run it on the online course server). when I run:

tokenizer = DistilBertTokenizerFast.from_pretrained(‘tokenizer/’)

I get the following message:

file tokenizer/config.json not found

and subsequently, when I run:

model = TFDistilBertForTokenClassification.from_pretrained(‘model/’, num_labels=len(unique_tags))

I get a long error but the bottom line says:

Unable to load weights from h5 file. If you tried to load a TF 2.0 model from a PyTorch checkpoint, please set from_pt=True.

It is worthwhile noting that I checked all the downloaded files and they seem to be the same files as on the server.


Hi Aff,

Sorry for the late response. Is this still an issue? How did you solve it? It seems that maybe some file was not downloaded properly or is corrupted.