Win10 安装TensorFlow tflearn
原博文: (主要是解决import tflearn时,突然出现的“ curses is not supported on this machine (please install/reinstall curses for an optimal experience)”问题、需要下载“curses-2.2-cp35-cp35m-win_amd64.whl”进行pip install) 1. 确保成功安装了tensorflow 2. 查看当前tensorflow下的库文件,判断是否已经安装了h5py,scipy:conda list 3. 若没有安装,安装h5py,scipy。我的电脑中没有安装h5py,安装:pip install h5py 4. 安装tflearn 5. 至此tflearn安装成功。 6. 从tflearn官网找的一个例子:http://tflearn.org/examples/ from __future__ import absolute_import,division,print_function import tflearn # Regression data X = [3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167,7.042,10.791,5.313,7.997,5.654,9.27,3.1] Y = [1.7,2.76,2.09,3.19,1.694,1.573,3.366,2.596,2.53,1.221,2.827,3.465,1.65,2.904,2.42,2.94,1.3] # Linear Regression graph input_ = tflearn.input_data(shape=[None]) linear = tflearn.single_unit(input_) regression = tflearn.regression(linear,optimizer='sgd',loss='mean_square',metric='R2',learning_rate=0.01) m = tflearn.DNN(regression) m.fit(X,Y,n_epoch=1000,show_metric=True,snapshot_epoch=False) print("nRegression result:") print("Y = " + str(m.get_weights(linear.W)) + "*X + " + str(m.get_weights(linear.b))) print("nTest prediction for x = 3.2,3.3,3.4:") print(m.predict([3.2,3.4])) 运行结果部分截图如下:
2.curses is not supported on this machine (please install/reinstall curses for an optimal experience) 2)从https://www.lfd.uci.edu/~gohlke/pythonlibs/下载curses2.2cp35nonewin_amd64.whl包 3)cd到下载的.whl的目录(如我的 ~/PythonTool)。直接输入命令 : pip install curses-2.2-cp36-cp36m-win32.whl 参考:https://github.com/lxzheng/machine_learning/wiki/TensorFlow--%E5%92%8C-TFlearn-Windows%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97 (编辑:鄂州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- windows .bat文件如何递归列出* .mp3类型的所有文件
- 2018-5-26 怎么在windows上远程连接linux服务器上的mysql
- 在Windows / C上加速Redis#
- 使用def文件简化dll导出
- windows – WFPSampler编译问题 – 找不到wfpcalloutsclass
- winapi – Windows SDK 7.0的signtool中的signwizard发生了
- Windows服务 – 编写自动更新Windows服务的最佳做法
- .net – SendKeys.Send和Windows Key
- windows – 使用cmd提示符搜索谷歌或其他搜索引擎上的单词
- Windows10环境下WDK开发使用IoCreateDeviceSecure无法解析的
- Windows环境下安装MySQL5.7及MySQL WrokBench
- 批处理文件 – Windows批处理将记录添加到主机文
- NonSerialized 字段如果在dll 中读到数据写入Mon
- https – 如何在非Windows平台上忽略“System.Ne
- office365 – 使用Microsoft Graph API显示即将到
- windows安装mysql碰到的问题、
- 老机器XP Outlook Express 发大附件对方客户端收
- win10下VMware安装CentOS7并配置网络
- winapi – 避免UAC,但使用Windows服务启动升级过
- windows-server-2008 – IIS可以从GPU核心创建线