bert运行报错: AttributeError: module 'tensorflow.contrib.tpu' has no attribute 'InputPipelineConfig'

bert的例子在GPU上执行时报错:

BERT-Classification-Tutorial → master$ sh run_classifier.sh 
/opt/miniconda3/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
WARNING:tensorflow:Flag task_name has a non-None default value; therefore, mark_flag_as_required will pass even if flag is not specified in the command line!
Traceback (most recent call last):
  File "run_classifier.py", line 929, in <module>
    tf.app.run()
  File "/opt/miniconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "run_classifier.py", line 783, in main
    is_per_host = tf.contrib.tpu.InputPipelineConfig.PER_HOST_V2
AttributeError: module 'tensorflow.contrib.tpu' has no attribute 'InputPipelineConfig'

搜到的解决方案: https://github.com/google-research/bert/issues/49
看来是跑bert的话得用 tf 1.11           
 pip install --upgrade tensorflow-gpu==1.11

但是会出现新的问题:ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory
解决方案:  https://blog.csdn.net/zzldm/article/details/81630267 

  • 2
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值