bert
bert copied to clipboard
PR to resolve issue #1140 - AttributeError: module 'tensorflow._api.v2.train' has no attribute 'Optimizer'
This PR has a minor modification to remove the error due to tensorflow version (>=2) incompatibility for optimizer.py. Due to deprecation of 'tf.train.Optimizer', an improvement is made which allows the optimizer to run smoothly with tf version>=2(tested locally with 2.3.1) . Suggestions are appreciated.Thanks
Changes:
- Provided python 2 support for _run_split_on_punc (tokenization.py)
- Provided tf2 options in modeling.py and modeling_test.py
:shipit: