wshuyi/demo-chinese-text-binary-classification-with-bert

请问出现module 'tensorflow._api.v2.train' has no attribute 'Optimizer'怎么解决?

Closed this issue · 3 comments

请问出现module 'tensorflow._api.v2.train' has no attribute 'Optimizer'怎么解决?

已解决

请问下怎么解决的

import tensorflow as tf

print(tf.version)
!pip uninstall tensorflow==2.3.0
!pip install tensorflow==1.15.0
!pip install bert-tensorflow

run this and restart environment, and then reimport tensorflow @marcocrxu