分享好友 人工智能首页 频道列表

win10 python3.7 Anaconda3 安装tensorflow+Keras

keras教程  2023-02-09 19:238200

首先tensorflow 不支持python3.7,只能用tf1.9
也就是说:py3.7+ tf 1.9 +keras 2.2.0 才可以

https://docs.floydhub.com/guides/environments/这个链接可以查询不同版本应该下载那个

到Tensorflow支持Python3.7的一个whl:Unofficial Windows Binaries for Python Extension Packages
在这个网页中,在茫茫人海中搜索到tensorFlow!

win10 python3.7 Anaconda3 安装tensorflow+Keras

 

下面是指责个whl文件的网盘链接 

链接: https://pan.baidu.com/s/1Mfc3571DvDijiAMfEsGjCg 提取码: yr6x


安装过程:

1.打开Anaconda prompt
2.python

win10 python3.7 Anaconda3 安装tensorflow+Keras

 

 


3.(base) C:\Users\Administrator>pip install tensorflow-1.9.0-cp37-cp37m-win_amd64.whl

这里应该切换到tensorflow-1.9.0-cp37-cp37m-win_amd64.whl的下载目录下,因为我把tensorflow-1.9.0-cp37-cp37m-win_amd64.whl放到了我Administrator,就不切换了

 

win10 python3.7 Anaconda3 安装tensorflow+Keras

 

 但是会超时

(base) C:\Users\Administrator>pip --default-timeout=100 install -U tensorflow-1.9.0-cp37-cp37m-win_amd64.whl

结果还是超时

解决方法:

连手机热点

再次执行 (base) C:\Users\Administrator>pip --default-timeout=100 install -U tensorflow-1.9.0-cp37-cp37m-win_amd64.whl

OK

win10 python3.7 Anaconda3 安装tensorflow+Keras

 

 原因:之前下载的Keras 不是2.2.0 ,版本错误

(base) C:\Users\Administrator>pip --default-timeout=100 install -U Keras==2.2.0.0

OK

win10 python3.7 Anaconda3 安装tensorflow+Keras

 

查看更多关于【keras教程】的文章

展开全文
相关推荐
反对 0
举报 0
图文资讯
热门推荐
优选好物
更多热点专题
更多推荐文章
Keras2.2 predict和fit_generator的区别
查看keras文档中,predict函数原型:predict(self, x, batch_size=32, verbose=0)说明:只使用batch_size=32,也就是说每次将batch_size=32的数据通过PCI总线传到GPU,然后进行预测。在一些问题中,batch_size=32明显是非常小的。而通过PCI传数据是非常耗时的

0评论2023-02-09861

keras模块学习之-激活函数(activations)--笔记
本笔记由博客园-圆柱模板 博主整理笔记发布,转载需注明,谢谢合作!   每一个神经网络层都需要一个激活函数,例如一下样例代码:           from keras.layers.core import Activation, Densemodel.add(Dense(64))model.add(Activation('tanh'))或把

0评论2023-02-09550

keras: 在构建LSTM模型时,使用变长序列的方法
众所周知,LSTM的一大优势就是其能够处理变长序列。而在使用keras搭建模型时,如果直接使用LSTM层作为网络输入的第一层,需要指定输入的大小。如果需要使用变长序列,那么,只需要在LSTM层前加一个Masking层,或者embedding层即可。from keras.layers import

0评论2023-02-09679

keras channels_last、preprocess_input、全连接层Dense、SGD优化器、模型及编译
channels_last 和 channels_firstkeras中 channels_last 和 channels_first 用来设定数据的维度顺序(image_data_format)。对2D数据来说,"channels_last"假定维度顺序为 (rows,cols,channels), 而"channels_first"假定维度顺序为(channels, rows, cols)。

0评论2023-02-091012

将keras的h5模型转换为tensorflow的pb模型 keras 调用h5模型
h5_to_pb.pyfrom keras.models import load_modelimport tensorflow as tfimport os import os.path as ospfrom keras import backend as K#路径参数input_path = 'input path'weight_file = 'weight.h5'weight_file_path = osp.join(input_path,weight_file

0评论2023-02-09773

Keras MAE和MSE source code
def mean_squared_error(y_true, y_pred):if not K.is_tensor(y_pred):y_pred = K.constant(y_pred)y_true = K.cast(y_true, y_pred.dtype)return K.mean(K.square(y_pred - y_true), axis=-1)def mean_absolute_error(y_true, y_pred):if not K.is_tensor(y_

0评论2023-02-09801

Keras网络层之“关于Keras的层(Layer)” keras的embedding层
关于Keras的“层”(Layer)所有的Keras层对象都有如下方法:layer.get_weights():返回层的权重(numpy array)layer.set_weights(weights):从numpy array中将权重加载到该层中,要求numpy array的形状与layer.get_weights()的形状相同layer.get_config():返回

0评论2023-02-09888

Keras分类问题 keras 分类模型
#-*- coding: utf-8 -*-#使用神经网络算法预测销量高低import pandas as pd#参数初始化inputfile = 'data/sales_data.xls'data = pd.read_excel(inputfile, index_col = u'序号') #导入数据#数据是类别标签,要将它转换为数据#用1来表示“好”、“是”、“高

0评论2023-02-09923

tf.keras遇见的坑:Output tensors to a Model must be the output of a TensorFlow `Layer`
经过网上查找,找到了问题所在:在使用keras编程模式是,中间插入了tf.reshape()方法便遇到此问题。 解决办法:对于遇到相同问题的任何人,可以使用keras的Lambda层来包装张量流操作,这是我所做的:embed1 = keras.layers.Embedding(10000, 32)(inputs) # e

0评论2023-02-09963

更多推荐