transformers/src/transformers
Yih-Dar b67fd797be
Add TFVisionEncoderDecoderModel (#14148)
* Start the work on TFVisionEncoderDecoderModel

* Expose TFVisionEncoderDecoderModel

* fix import

* Add modeling_tf_vision_encoder_decoder to _ignore_modules in get_model_modules()

* reorder

* Apply the fix for checkpoint loading as in #14016

* remove attention_mask + fix VISION_DUMMY_INPUTS

* A minimal change to make TF generate() work for vision models as encoder in encoder-decoder setting

* fix wrong condition: shape_list(input_ids) == 2

* add tests

* use personal TFViTModel checkpoint (for now)

* Add equivalence tests + projection layer

* style

* make sure projection layer can run

* Add examples

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* Clean comments (need to work on TODOs for PyTorch models)

* Remove TF -> PT in check_pt_tf_equivalence for TFVisionEncoderDecoderModel

* fixes

* Revert changes in PT code.

* Update tests/test_modeling_tf_vision_encoder_decoder.py

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>

* Add test_inference_coco_en for TF test

* fix quality

* fix name

* build doc

* add main_input_name

* Fix ckpt name in test

* fix diff between master and this PR

* fix doc

* fix style and quality

* fix missing doc

* fix labels handling

* Delete auto.rst

* Add the changes done in #14016

* fix prefix

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* make style

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
2022-01-10 13:30:14 -05:00
..
benchmark
commands Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
data Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
models Add TFVisionEncoderDecoderModel (#14148) 2022-01-10 13:30:14 -05:00
onnx Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
pipelines Enabling TF on image-classification pipeline. (#15030) 2022-01-06 14:16:00 +01:00
sagemaker
utils Add TFVisionEncoderDecoderModel (#14148) 2022-01-10 13:30:14 -05:00
__init__.py Add TFVisionEncoderDecoderModel (#14148) 2022-01-10 13:30:14 -05:00
activations.py
activations_tf.py Add TFCLIPModel (#13967) 2021-12-23 11:19:44 -05:00
configuration_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
convert_graph_to_onnx.py Fix a little typo (#15002) 2022-01-04 12:59:47 +01:00
convert_pytorch_checkpoint_to_tf2.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
convert_slow_tokenizer.py Mass conversion of documentation from rst to Markdown (#14866) 2021-12-21 15:06:33 -05:00
convert_slow_tokenizers_checkpoints_to_fast.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
convert_tf_hub_seq_to_seq_bert_to_pytorch.py
debug_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
deepspeed.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
dependency_versions_check.py
dependency_versions_table.py Enabling tokenizers upgrade. (#14941) 2021-12-30 17:30:58 +01:00
feature_extraction_sequence_utils.py [doc] :class: hunt (#14955) 2021-12-27 17:17:38 -08:00
feature_extraction_utils.py [AutoProcessor] Correct AutoProcessor and automatically add processor… (#14881) 2021-12-30 09:56:43 +01:00
file_utils.py Make OpenAIGPTTokenizer work with SpaCy 2.x and 3.x (#15019) 2022-01-10 07:53:20 -05:00
generation_beam_search.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
generation_flax_logits_process.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
generation_flax_utils.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
generation_logits_process.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
generation_stopping_criteria.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
generation_tf_utils.py Add TFVisionEncoderDecoderModel (#14148) 2022-01-10 13:30:14 -05:00
generation_utils.py [Generate] correct encoder_outputs are passed without attention_mask (#14980) 2021-12-30 10:16:03 +01:00
hf_argparser.py
image_utils.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
integrations.py [doc] consistent True/False/None default format (#14951) 2021-12-27 14:31:40 -08:00
keras_callbacks.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
modelcard.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
modeling_flax_outputs.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
modeling_flax_pytorch_utils.py Mass conversion of documentation from rst to Markdown (#14866) 2021-12-21 15:06:33 -05:00
modeling_flax_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
modeling_outputs.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
modeling_tf_outputs.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
modeling_tf_pytorch_utils.py
modeling_tf_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
modeling_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
optimization.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
optimization_tf.py [doc] consistent True/False/None default format (#14951) 2021-12-27 14:31:40 -08:00
py.typed
testing_utils.py Make OpenAIGPTTokenizer work with SpaCy 2.x and 3.x (#15019) 2022-01-10 07:53:20 -05:00
tokenization_utils.py Fixing a pathological case for slow tokenizers (#14981) 2021-12-30 09:10:34 +01:00
tokenization_utils_base.py Improve truncation_side (#14947) 2022-01-03 16:18:39 +01:00
tokenization_utils_fast.py Improve truncation_side (#14947) 2022-01-03 16:18:39 +01:00
trainer.py Allow training to resume even if RNG states are not properly loaded (#14994) 2021-12-30 17:03:20 -05:00
trainer_callback.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
trainer_pt_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
trainer_seq2seq.py [doc] :obj: hunt (#14954) 2021-12-27 15:49:48 -08:00
trainer_tf.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
trainer_utils.py Doc styler examples (#14953) 2021-12-27 19:07:46 -05:00
training_args.py [doc] :obj: hunt (#14954) 2021-12-27 15:49:48 -08:00
training_args_seq2seq.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00
training_args_tf.py Doc styler v2 (#14950) 2021-12-27 16:31:21 -05:00