Yih-Dar
|
8f2cc1c3ab
|
Add TFCLIPModel (#13967)
* Start the work for TFCLIPModel
* Convert to TF code (TODO: loss + doc)
* Clean up
* Fix pooled_output for TFCLIPTextTransformer - using tf.gather_nd
* assert -> raise error
* Expose TFCLIPModel
* Deal with dummy_inputs
* Add tests
* Fix all tests. TODO: manual check weight loading + add more comments
* Fix pt tf equivalence test
* fixes
* update TFCLIPVisionEmbeddings's Conv2D
* Fix loss + overwrite test_pt_tf_model_equivalence from common
* Add a comment about the change about MainLayer in test_keras_save_load
* Set return_loss=True in TFCLIPModelTester + make tests pass
* overwrite test_pt_tf_model_equivalence from tf common
* fix base_model_prefix
* Fix examples
* remove unused
* Apply suggestions from code review
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* apply review suggestions
* change self.pre_layrnorm to self.pre_layernorm
* apply more review suggestions
* return attention probs before dropout (to align with PT)
* fix weight init
* fix
* build doc
* fix missing doc
* fix for test
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
|
2021-12-23 11:19:44 -05:00 |
|