Closed Logicus03 closed 4 years ago
Hi! This error appears when I try to load my downloaded model.
` BERT_PRETRAINED_DIR = "../input/bert-base-portuguese-cased"
config_path = os.path.join(BERT_PRETRAINED_DIR, 'bert_config.json') checkpoint_path = os.path.join(BERT_PRETRAINED_DIR, 'model.ckpt.index')
config = BertConfig.from_json_file( config_path ) portug_model = TFBertModel.from_pretrained( pretrained_model_name_or_path = checkpoint_path, from_pt = False, config = config ) `
Can anyone help me?
Solved using pytorch checkpoint stackoverflow suggestion.
Hi! This error appears when I try to load my downloaded model.
` BERT_PRETRAINED_DIR = "../input/bert-base-portuguese-cased"
config_path = os.path.join(BERT_PRETRAINED_DIR, 'bert_config.json') checkpoint_path = os.path.join(BERT_PRETRAINED_DIR, 'model.ckpt.index')
config = BertConfig.from_json_file( config_path ) portug_model = TFBertModel.from_pretrained( pretrained_model_name_or_path = checkpoint_path, from_pt = False, config = config ) `
Can anyone help me?