mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
fix hasattr
This commit is contained in:
parent
0c1a6f9b1d
commit
cfcb95417c
@ -970,7 +970,7 @@ class TransfoXLPreTrainedModel(nn.Module):
|
||||
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
|
||||
model.__class__.__name__, "\n\t".join(error_msgs)))
|
||||
# Make sure we are still sharing the input and output embeddings
|
||||
if model.hasattr('tie_weights'):
|
||||
if hasattr(model, 'tie_weights'):
|
||||
model.tie_weights()
|
||||
return model
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user