Fix TF BART for saved model creation (#9252)
* Fix TF BART for saved model creation
* Apply style
* Update src/transformers/models/bart/modeling_tf_bart.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Update src/transformers/models/bart/modeling_tf_bart.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
* Rework the fix
* Fix condition
* Apply style
* Fix condition
* Fix shape_list
* Apply Patrick's solution
* Apply Patrick's solution
* Rebase
* make tests pass
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: patrickvonplaten <patrick.v.platen@gmail.com>