Fill-Mask
Transformers
PyTorch
Safetensors
bert
custom_code
robinzixuan commited on
Commit
2e772b2
·
verified ·
1 Parent(s): e1ac308

Update modeling_bert.py

Browse files
Files changed (1) hide show
  1. modeling_bert.py +1 -2
modeling_bert.py CHANGED
@@ -175,8 +175,7 @@ def load_tf_weights_in_bert(model, config, tf_checkpoint_path):
175
  array = np.transpose(array)
176
  try:
177
  if pointer.shape != array.shape:
178
- raise ValueError(f"Pointer shape {pointer.shape} and array shape {
179
- array.shape} mismatched")
180
  except ValueError as e:
181
  e.args += (pointer.shape, array.shape)
182
  raise
 
175
  array = np.transpose(array)
176
  try:
177
  if pointer.shape != array.shape:
178
+ raise ValueError(f"Pointer shape {pointer.shape} and array shape {array.shape} mismatched")
 
179
  except ValueError as e:
180
  e.args += (pointer.shape, array.shape)
181
  raise