自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 《python深度学习》keras书籍读书笔记

keras学习过程问题记录:1.“models.Sequential()”中Sequential函数作用:Sequential模型字面上的翻译是顺序模型,感觉是简单的线性模型,但实际上Sequential模型可以构建非常复杂的神经网络,包括全连接神经网络、卷积神经网络(CNN)、循环神经网络(RNN)等等。Sequential更准确的理解应该为堆叠,通过堆叠许多不同的层,构建出深度神经网络。 所以这个是构建一个顺序模型网络。2.models.Sequential().compile()方法中各个参数的

2020-08-12 14:18:42 354

原创 语义分割中的评价指标问题

个人小结:总结自己在语义分割中出现的评价指标资料不全问题,仅供参考

2021-12-14 23:19:49 2897 1

原创 PackagesNotFoundError: The following packages are not available from current channels:报错解决

在新建conda环境的时候,报PacjagesNotFoundError,这个是因为渠道无法下载到这个提示的python3.6的包我们只需要新增清华镜像源即可conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/     conda config --set show_channel_urls yes...

2020-12-01 22:03:49 2137

原创 python方法:x.get_shape().as_list()

a_array = np.array([[1, 2, 3], [4, 5, 6]])b_list = [[1, 2, 3], [3, 4, 5]]c_tensor = tf.constant([[1, 2, 3], [4, 5, 6]])d=c_tensor.get_shape()e=d.as_list()print("a:",type(a_array))print("b_list:",type(b_list))print("c_tensor:",type(c_tensor))print("

2020-11-25 11:28:22 1591

原创 服务器项目运行报多行警告

W1124 12:35:20.182403 140706554345280 ag_logging.py:145] Entity <bound method Conv.call of <tensorflow.python.layers.convolutional.Conv2D object at 0x7ff75b588198>> could not be transformed and will be executed as-is. Please report this to the

2020-11-24 12:41:27 734

原创 python之if语句not in与in

fruits = ['apple','banana','orange']print('apple' in fruits) #Trueprint('apple' not in fruits) #Falsenumber=(1,2,3,4,5)print("2" in number)#Falseprint(2 in number)#Truezimu=("ss")print("ss" in zimu)#Truenot in与in刚好相反

2020-11-23 10:07:46 6044

原创 报错:‘dict‘ object has no attribute ‘iteritems‘

因为字典中的iteritems方法是python2专有的,python3改成了items方法

2020-09-20 11:07:04 280

转载 范数小知识

L0范数是指向量中非0的元素的个数。(L0范数很难优化求解)L1范数是指向量中各个元素绝对值之和L2范数是指向量各元素的平方和然后求平方根L1范数可以进行特征选择,即让特征的系数变为0.L2范数可以防止过拟合,提升模型的泛化能力,有助于处理 condition number不好下的矩阵(数据变化很小矩阵求解后结果变化很大)(核心:L2对大数,对outlier离群点更敏感!)下降速度:最小化权值参数L1比L2变化的快模型空间的限制:L1会产生稀疏 L2不会。L1会趋向于产生少量的特征,而其他的

2020-09-14 11:39:33 218

原创 numpy.random.normal()函数

numpy.random.normal(loc=0,scale=1e-2,size=shape)参数解释:1.参数loc(float):正态分布的均值,对应着这个分布的中心。loc=0说明这一个以Y轴为对称轴的正态分布,2.参数scale(float):正态分布的标准差,对应分布的宽度,scale越大,正态分布的曲线越矮胖,scale越小,曲线越高瘦。3.参数size(int 或者整数元组):输出的值赋在shape里,默认为None。...

2020-09-09 19:54:11 670 1

原创 导入keras数据集报错:ValueError: Object arrays cannot be loaded when allow_pickle=False

输入代码:(x_train,y_train),(x_test,y_test)=imdb.load_data(num_words=max_features)报错:ValueError: Object arrays cannot be loaded when allow_pickle=False分析原因:自Numpy 1.16.3版本发行之后,函数 numpy.load() 和 numpy.lib.format.read_array() 采用allow_pickle关键字,现在默认为False。所

2020-09-09 10:00:15 149

原创 网络架构使用预训练的ImageNet参数报错ConnectionResetError: [WinError 10054]

在构建Inception V3、VGG19等网络架构的时候,from keras.applications import inception_v3K.set_learning_phase(0)//因为我们不需要训练模型model=inception_v3.InceptionV3(weights='imagenet',include_top=False)运行这段代码报错:Downloading data from https://github.com/fchollet/deep-learning-

2020-09-04 14:41:51 231

原创 keras知识点(网络层和网络配置)

2020-09-03 21:52:44 148

原创 python中numpy.random.randint()语法

语法:x=np.random.randint(min,max,size)随机生成n个大于等于min,小于max的整数,数量为size个。代码举例:import numpy as npprint(np.random.randint(1, 10, 3))print(np.random.randint(1, 100, 10))输出:

2020-08-21 10:42:02 904

原创 python列表中的双冒号含义

语法:list[start????step]start:表示从下标多少开始,如果没有,按照0默认值end:表示下标多少结束,如果没有,按照len-1默认值step:步幅。代码理解:x=[1,2,3,4]x[::1][1,2,3,4]x[::-1][4,3,2,1]x[::-2][4,2]x[1::1][2,3,4]x[1::-1][2,1]...

2020-08-17 14:34:29 2559 1

原创 python读取文件方法详解

python读取文件一共有四种读取方法:1.按照行读取,每行返回一个字符串类型f1= open("C:/Users/Administrator/Desktop/qj_ly_product_list.txt",'r',encoding= 'UTF-8')for i in f1: print(i,end = '')2.read方法,按照指定参数size来往内存存入,如果没有指定参数,就一次性读取文件的所有内容。f2=open("C:/Users/Administrator/Desktop/q

2020-08-16 20:22:04 2602 1

转载 numpy中array()和asarray()的区别

array和asarray都可以将数据结构转换成ndarray类型。但是主要区别就是当数据源是ndarray时,array仍会copy出一个副本,占用新的内存,但asarray不会。import numpy as np #example 1: data1=[[1,1,1],[1,1,1],[1,1,1]] arr2=np.array(data1) arr3=np.asarray(data1) data1[1][1]=2 print 'data1:\n',data1 p

2020-08-16 17:07:34 200

转载 python os.path模块常用方法详解

python os.path模块常用方法详解os.path模块主要用于文件的属性获取,在编程中经常用到,以下是该模块的几种常用方法。更多的方法可以去查看官方文档:http://docs.python.org/library/os.path.html1.os.path.abspath(path)返回path规范化的绝对路径。os.path.abspath(‘test.csv’)‘C:\Python25\test.csv’os.path.abspath(‘c:\test.csv’

2020-08-16 10:59:53 151

原创 VGG16网络模型

VGG-16卷积网络结构层次:一共十六层,13个卷积层和3个全连接层。第一次经过64个卷积核的两次卷积后,采用一次pooling,第二次经过两次128个卷积核卷积后,再采用pooling,再重复两次三个512个卷积核卷积后,再pooling,最后经过三次全连接。结构图:...

2020-08-13 17:23:53 410

原创 python列表[]中冒号:的作用

首先python[]是用于定义列表或引用列表、数组、字符串及元组中元素位置。定义一个列表a,其中a[ : n]表示从第0个元素到第n个元素(不包括n),a[1: ] 表示该列表中的第1个元素到最后一个元素。

2020-08-12 09:34:59 983

原创 python之np.argmax()及对axis=0/1/-1等参数理解参数理解

在numpy中,有很多的函数都涉及到axis,很多函数根据axis的取值不同,得到的结果也完全不同。这里通过详细的例子来学习下,axis到底是什么,它在numpy中的作用到底如何。一、函数理解首先argmax() 这个函数的作用是算出数组中最大值的下标。举个例子:a = [3, 1, 2, 4, 6, 1]maxindex = 0i = 0for tmp in a: if tmp > a[maxindex]: maxindex = i i += 1pri

2020-08-11 16:38:24 4054

原创 导入keras报警告:FutureWarning: Conversion of the second argument.........

直接输入(更换h5py的版本)pip install h5py==2.8.0rc1 就解决了,正常导入,不报异常

2020-08-09 00:44:31 164

原创 keras导入出错:runtimeError:module compiled against API version 0xc but this version of numpy is 0xb

runtimeError:module compiled against API version 0xc but this version of numpy is 0xb看图知道是numpy版本的问题,所以pip install numpy==1.14.5 -i https://pypi.tuna.tsinghua.edu.cn/simple成功。主要是因为keras依赖的numpy包的问题...

2020-08-09 00:41:06 196

原创 导入TensorFlow报警告np_resource = np.dtype([(“ resource”,np.ubyte,1)])]) _np_qint8......

安装完TensorFlow 后进行import导入时报警告/home/yuki/.local/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (t

2020-08-07 10:00:31 1528

原创 TensorFlow版本配套关系表(cudnn,cuda,python)

TensorFlow版本对照表Windows系统:Linux系统:Mac系统:

2020-08-06 23:49:28 295

原创 TensorFlow安装出错:Cannot determine archive format of /tmp/pip-fd2724ty-build

python环境3.6在安装TensorFlow的时候报错,用的是清华镜像园,安装命令:pip install tensorflow`==1.3.0 https://pypi.tuna.tsinghua.edu.cn/simple/后来换成pip install tensorflow`==1.3.0 -i https://pypi.tuna.tsinghua.edu.cn/simple/就成功安装...

2020-08-06 23:42:17 507

原创 matplotlib.pyplot中add_subplot方法参数111的含义

在学习过程中遇到代码:Ax = Fig.add_subplot(111) 其中参数111不是很理解意思,通过百度发现其中,参数349的意思是:将画布分割成3行4列,图像画在从左到右从上到下的第9块。那么以此类推111的意思是 figure分割为1行1列,图像画在从左往右从上到下的第一块...

2020-07-31 20:44:40 1144

原创 [keras]解决数据集下载不了/下载速度过慢的问题

首先keras加载数据包是从他的dataset文件包下加载,如果没有就会通过 url = https://s3.amazonaws.com/img-datasets/mnist.npz 进行下载的。直接从官网的链接下载的话会非常的慢,而且即使刚开始可以下载,但是中途可能也会出错,非常浪费时间。keras加载包文件夹位置:系统盘->用户->用户名->.keras这边有mnist数据包百度网盘链接,提取码:un7y...

2020-07-18 22:36:05 1626

原创 运行TensorFlow出现The TensorFlow library wasn‘t compiled to use FMA instructions)代码

TensorFlow出错点(2)(The TensorFlow library wasn't compiled to use FMA instructions)错误提示:解决措施:错误提示:摘取错误编码:The TensorFlow library wasn’t compiled to use FMA instructions网上搜了下,也有可能会出现The TensorFlow library wasn’t compiled to use SSE instructions只要是用的是Tens

2020-07-14 15:35:13 1227

原创 导入TensorFlow报错误代码TypeError:expected bytes,Descriptor found

安装TensorFlow出错点(1)目录环境介绍:错误点:解决措施目录新手小白,入门深度学习,安装keras前配置TensorFlow。环境介绍:python版本:3.5.2使用的是Anaconda安装了:keras(2.0.6),TensorFlow(1.1.0)错误点:进入python中import tensorflow as tf中报一断错误代码解决措施查了相关csdn文档,发现是protobuf版本和TensorFlow版本不匹配,附上版本对应:tensorflow 1.5

2020-07-14 15:13:07 1705 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除