Import structure & first three model refactors (#31329)
* Import structure & first three model refactors * Register -> Export. Export all in __all__. Sensible defaults according to filename. * Apply most comments from Amy and some comments from Lucain Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com> Co-authored-by: Lucain Pouget <lucainp@gmail.com> * Style * Add comment * Clearer .py management * Raise if not in backend mapping * More specific type * More efficient listdir * Misc fixes --------- Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com> Co-authored-by: Lucain Pouget <lucainp@gmail.com>
This commit is contained in:
@@ -34,8 +34,8 @@ if is_torch_available():
|
||||
LongformerForSequenceClassification,
|
||||
LongformerForTokenClassification,
|
||||
LongformerModel,
|
||||
LongformerSelfAttention,
|
||||
)
|
||||
from transformers.models.longformer.modeling_longformer import LongformerSelfAttention
|
||||
|
||||
|
||||
class LongformerModelTester:
|
||||
|
||||
@@ -37,8 +37,8 @@ if is_tf_available():
|
||||
TFLongformerForSequenceClassification,
|
||||
TFLongformerForTokenClassification,
|
||||
TFLongformerModel,
|
||||
TFLongformerSelfAttention,
|
||||
)
|
||||
from transformers.models.longformer.modeling_tf_longformer import TFLongformerSelfAttention
|
||||
from transformers.tf_utils import shape_list
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user