Markus28 commited on
Commit
a0c289c
1 Parent(s): 4c68a4c

strict=True for debugging

Browse files
Files changed (1) hide show
  1. modeling_bert.py +1 -1
modeling_bert.py CHANGED
@@ -329,7 +329,7 @@ class BertPreTrainedModel(nn.Module):
329
  """
330
  # Instantiate model.
331
  model = cls(config, *inputs, **kwargs)
332
- load_return = model.load_state_dict(state_dict_from_pretrained(model_name), strict=False)
333
  logger.info(load_return)
334
  return model
335
 
 
329
  """
330
  # Instantiate model.
331
  model = cls(config, *inputs, **kwargs)
332
+ load_return = model.load_state_dict(state_dict_from_pretrained(model_name), strict=True)
333
  logger.info(load_return)
334
  return model
335