ubuntu16.04 keras程序运行报错和解决
2017-09-25 15:48
274 查看
为了实现神经网络的Dropout随机失活,在网上搜了神经网络的Dropout正则化,它使用keras实现,我的tensorflow环境没有keras,因此安装:
报错:
解决方式:
Which tensorflow pip package did you install? -- I just realized you installed through conda. The packages in conda are community maintained, so I am not sure what might be wrong there. Is it possible for you to try a pip install,
maybe in a clean conda environment? the command should be
在ubuntu终端输入source activate tensorflow,激活tensorflow环境,然后使用pip install keras安装,安装成功之后在pycharm import keras不报错;
实现链接中的代码并运行:报错:
tensorflow.python.framework.errors_impl.NotFoundError: /home/rh/Applications/Anaconda/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/_cudnn_rnn_ops.so: cannot open shared object file: No such file or directory
解决方式:
Which tensorflow pip package did you install? -- I just realized you installed through conda. The packages in conda are community maintained, so I am not sure what might be wrong there. Is it possible for you to try a pip install,
maybe in a clean conda environment? the command should be
:pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp35-cp35m-linux_x86_64.whl(在tensorflow1环境下)[/code]但是运行到一半在终端报错了,没管,再一次用pycharm运行程序解决方式:
报错:setuptools-27.2.0-py3.5.egg
1. 下载ez_setup.py。Linux下可使用此命令: wget -q http://peak.telecommunity.com/dist/ez_setup.py。
2. 运行ez_setup.py:python ez_setup.py ;如果运行正常,那就安装成功了。(在tensorflow1环境下)
但是终端还是报错,没管,再一次运行pycharm报错:keras sigmoid_cross_entropy_with_logits() got an unexpected keyword argument 'labels'
解决方式:
基于Tensorflow的keras运行错误解决方案
终端运行没有报错,运行pycharm,成功
相关文章推荐
- 解决linux/Ubuntu下Qt creater 界面程序在编译运行后无法显示中文或中文乱码问题!
- Ubuntu 16.04下用Wine运行的软件出现方块的解决思路(应该是兼容现在所有平台的Wine碰到这个的问题)
- <Linux>WIN10内置Ubuntu子系统运行图形程序,解决中文乱码
- Ubuntu16.04解决eclipse无法正常运行方法
- 【Ubuntu】在QT运行程序后无结果显示,只有终端运行的解决办法
- <Linux>WIN10内置Ubuntu子系统运行图形程序,解决中文乱码
- ubuntu解决程序编译运行的依赖问题方法论
- <Linux>WIN10内置Ubuntu子系统运行图形程序,解决中文乱码
- 解决在ubuntu下运行codeblock程序出现 permision denied的问题
- Ubuntu16.0.4LTS 64位上运行32位程序,提示No such file or directory?错误的解决办法
- 解决在ubuntu下运行codeblock程序出现 permision denied的问题
- <Linux>WIN10内置Ubuntu子系统运行图形程序,解决中文乱码
- Codeblock解决注释乱码问题及在ubuntu中程序运行时乱码问题
- <Linux>WIN10内置Ubuntu子系统运行图形程序,解决中文乱码
- ubuntu中运行程序libg2c.so.0 文件找不到 解决方法
- <Linux>WIN10内置Ubuntu子系统运行图形程序,解决中文乱码
- QT程序界面在Ubuntu不同权限级别运行差异的解决方法
- Ubuntu下在Eclipse IDE for C/C++ Developers中如何运行C语言的GTK程序?(已解决)
- 关于Ubuntu16.04安装opencv2.4.13及编译运行opencv程序的相关问题
- 解决ubuntu 64位系统 无法运行32位程序的问题