ImportError: cannot import name ‘tf_utils‘

报错原因

tensorflow与keras版本兼容问题

解决方案

FrameworkEnv name (--env parameter)DescriptionDocker ImagePackages and Nvidia Settings
TensorFlow 1.14tensorflow-1.14TensorFlow 1.14.0 + Keras 2.2.5 on Python 3.6.floydhub/tensorflowTensorFlow-1.14
TensorFlow 1.13tensorflow-1.13TensorFlow 1.13.0 + Keras 2.2.4 on Python 3.6.floydhub/tensorflowTensorFlow-1.13
TensorFlow 1.12tensorflow-1.12TensorFlow 1.12.0 + Keras 2.2.4 on Python 3.6.floydhub/tensorflowTensorFlow-1.12
 tensorflow-1.12:py2TensorFlow 1.12.0 + Keras 2.2.4 on Python 2.floydhub/tensorflow 
TensorFlow 1.11tensorflow-1.11TensorFlow 1.11.0 + Keras 2.2.4 on Python 3.6.floydhub/tensorflowTensorFlow-1.11
 tensorflow-1.11:py2TensorFlow 1.11.0 + Keras 2.2.4 on Python 2.floydhub/tensorflow 
TensorFlow 1.10tensorflow-1.10TensorFlow 1.10.0 + Keras 2.2.0 on Python 3.6.floydhub/tensorflowTensorFlow-1.10
 tensorflow-1.10:py2TensorFlow 1.10.0 + Keras 2.2.0 on Python 2.floydhub/tensorflow 
TensorFlow 1.9tensorflow-1.9TensorFlow 1.9.0 + Keras 2.2.0 on Python 3.6.floydhub/tensorflowTensorFlow-1.9
 tensorflow-1.9:py2TensorFlow 1.9.0 + Keras 2.2.0 on Python 2.floydhub/tensorflow 
TensorFlow 1.8tensorflow-1.8TensorFlow 1.8.0 + Keras 2.1.6 on Python 3.6.floydhub/tensorflowTensorFlow-1.8
 tensorflow-1.8:py2TensorFlow 1.8.0 + Keras 2.1.6 on Python 2.floydhub/tensorflow 
TensorFlow 1.7tensorflow-1.7TensorFlow 1.7.0 + Keras 2.1.6 on Python 3.6.floydhub/tensorflowTensorFlow-1.7
 tensorflow-1.7:py2TensorFlow 1.7.0 + Keras 2.1.6 on Python 2.floydhub/tensorflow 
TensorFlow 1.5tensorflow-1.5TensorFlow 1.5.0 + Keras 2.1.6 on Python 3.6.floydhub/tensorflowTensorFlow-1.5
 tensorflow-1.5:py2TensorFlow 1.5.0 + Keras 2.1.6 on Python 2.floydhub/tensorflow 
TensorFlow 1.4tensorflow-1.4TensorFlow 1.4.0 + Keras 2.0.8 on Python 3.6.floydhub/tensorflow 
 tensorflow-1.4:py2TensorFlow 1.4.0 + Keras 2.0.8 on Python 2.floydhub/tensorflow 
TensorFlow 1.3tensorflow-1.3TensorFlow 1.3.0 + Keras 2.0.6 on Python 3.6.floydhub/tensorflow 
 tensorflow-1.3:py2TensorFlow 1.3.0 + Keras 2.0.6 on Python 2.floydhub/tensorflow 
TensorFlow 1.2tensorflow-1.2TensorFlow 1.2.0 + Keras 2.0.6 on Python 3.5.floydhub/tensorflow 
 tensorflow-1.2:py2TensorFlow 1.2.0 + Keras 2.0.6 on Python 2.floydhub/tensorflow 
TensorFlow 1.1tensorflowTensorFlow 1.1.0 + Keras 2.0.6 on Python 3.5.floydhub/tensorflow 
 tensorflow:py2TensorFlow 1.1.0 + Keras 2.0.6 on Python 2.floydhub/tensorflow 
TensorFlow 1.0tensorflow-1.0TensorFlow 1.0.0 + Keras 2.0.6 on Python 3.5.floydhub/tensorflow 
 tensorflow-1.0:py2TensorFlow 1.0.0 + Keras 2.0.6 on Python 2.floydhub/tensorflow 
TensorFlow 0.12tensorflow-0.12TensorFlow 0.12.1 + Keras 1.2.2 on Python 3.5.floydhub/tensorflow 
 tensorflow-0.12:py2TensorFlow 0.12.1 + Keras 1.2.2 on Python 2.floydhub/tensorflow 
PyTorch 1.1pytorch-1.1PyTorch 1.1.0 + fastai 1.0.57 on Python 3.6.floydhub/pytorchPyTorch-1.1
PyTorch 1.0pytorch-1.0PyTorch 1.0.0 + fastai 1.0.51 on Python 3.6.floydhub/pytorchPyTorch-1.0
 pytorch-1.0:py2PyTorch 1.0.0 on Python 2.floydhub/pytorch 
PyTorch 0.4pytorch-0.4PyTorch 0.4.1 on Python 3.6.floydhub/pytorchPyTorch-0.4
 pytorch-0.4:py2PyTorch 0.4.1 on Python 2.floydhub/pytorch 
PyTorch 0.3pytorch-0.3PyTorch 0.3.1 on Python 3.6.floydhub/pytorchPyTorch-0.3
 pytorch-0.3:py2PyTorch 0.3.1 on Python 2.floydhub/pytorch 
PyTorch 0.2pytorch-0.2PyTorch 0.2.0 on Python 3.5floydhub/pytorch 
 pytorch-0.2:py2PyTorch 0.2.0 on Python 2.floydhub/pytorch 
PyTorch 0.1pytorch-0.1PyTorch 0.1.12 on Python 3.floydhub/pytorch 
 pytorch-0.1:py2PyTorch 0.1.12 on Python 2.floydhub/pytorch 
Theano 0.9theano-0.9Theano rel-0.8.2 + Keras 2.0.3 on Python3.5.floydhub/theano 
 theano-0.9:py2Theano rel-0.8.2 + Keras 2.0.3 on Python2.floydhub/theano 
CaffecaffeCaffe rc4 on Python3.5.floydhub/caffe 
 caffe:py2Caffe rc4 on Python2.floydhub/caffe 
TorchtorchTorch 7 with Python 3 env.floydhub/torch 
 torch:py2Torch 7 with Python 2 env.floydhub/torch 
Chainer 1.23chainer-1.23Chainer 1.23.0 on Python 3.floydhub/chainer 
 chainer-1.23:py2Chainer 1.23.0 on Python 2.floydhub/chainer 
Chainer 2.0chainer-2.0Chainer 1.23.0 on Python 3.floydhub/chainer 
 chainer-2.0:py2Chainer 1.23.0 on Python 2.floydhub/chainer 
MxNet 1.0mxnetMxNet 1.0.0 on Python 3.6.floydhub/mxnet 
 mxnet:py2MxNet 1.0.0 on Python 2.floydhub/mxnet

 

 查看keras的版本,毕竟安装keras比起安装tensorflow好多了

1、先卸载keras

2、安装对应版本的keras

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值