自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ZYYRWish_97的博客

万物皆可DeepLearning

  • 博客(54)
  • 收藏
  • 关注

原创 解决:ParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input fi

解决方法:https://blog.csdn.net/weixin_45798684/article/details/109297232

2020-10-26 20:12:36 4353

原创 解决:ParserError: Error tokenizing data. C error: Expected 1 fields in line 16, saw 2

本来运行没毛病lbptop_train = pd.read_csv('D:\Workspace\JupyterNotebook\LBP-TOP\lbptop_data_tr.csv', header=None);换个文件,出错了lbptop_train = pd.read_csv('D:\Workspace\JupyterNotebook\LBP-TOP\lbptop_data_tr_landmarks.csv', header=None);ParserError: Error tokeniz

2020-10-26 20:08:02 15620 2

原创 解决:error: (-215:Assertion failed) !_src.empty() in function ‘cvtColor‘

原因是没有找到输入的图片,有时候使用摄像头的时候也会经常报这个错误,这个时候需要检查一下自己输入的图片地址是否正确,或者摄像头是否能够正常打开。

2020-08-15 20:32:11 5628

原创 解决:pandas 取消读取csv时默认第一行为列名

当第一行为有效数据,不可作为列名给 pd.read_csv() 加上 header=None 即可读出来的数据第一行为正常数据,列名为从0开始的序列>>> concated_lbptop_train = pd.read_csv('lbptop_data_tr.csv');>>> concated_lbptop_train.shape(28, 768)>>> concated_lbptop_train = pd.read_csv('lbptop

2020-08-13 14:39:18 5905

原创 解决:get_forge_pkg: could not read URL, please verify internet connection

比如这段代码现在出现error: get_forge_pkg: could not read URL, please verify internet connection>> pkg install -forge imageerror: get_forge_pkg: could not read URL, please verify internet connectionerror: called from get_forge_pkg at line 66 column 7

2020-08-06 22:39:25 1718

原创 解决:the ‘imresize‘ function belongs to the image package from Octave Forge which you have installed b

比如这段代码现在出现warning: the ‘imresize’ function belongs to the image package from Octave Forge which you have installed but not loaded. To load the package, run ‘pkg load image’ from the Octave prompt. Please read https://www.octave.org/missing.html to learn h

2020-08-06 22:32:56 3049 2

转载 解决:笔记本蓝牙没了突然消失不见了

转自:https://www.zhihu.com/question/49943281

2020-07-27 10:31:31 1759

原创 LeetCode 二叉树的前序 中序 后序 层序遍历 递归算法 迭代算法 C++

二叉树的前序遍历给定一个二叉树,返回它的 前序 遍历。示例:递归算法:/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */class Solution {pub

2020-07-22 11:41:43 1002

转载 机器视觉 LBP-TOP (local binary patterns from three orthogonal planes)

转自:https://blog.csdn.net/matrix_space/article/details/52136900之前介绍过机器视觉中常用到的一种特征:LBPhttps://blog.csdn.net/weixin_45798684/article/details/107498976LBP可以有效地处理光照变化,在纹理分析,纹理识别方面被广泛应用。但是LBP 只能处理单张的二维图像,对于视频或者图像序列,如何用LBP来提取特征,捕捉视频序列的运动信息呢。今天我们就介绍一种称为 LBP-TO

2020-07-21 21:29:08 1828 5

转载 机器视觉 Local Binary Pattern (LBP)

转自:https://blog.csdn.net/matrix_space/article/details/50481641Local binary pattern (LBP),在机器视觉领域,是非常重要的一种特征。LBP可以有效地处理光照变化,在纹理分析,纹理识别方面被广泛应用。LBP 的算法非常简单,简单来说,就是对图像中的某一像素点的灰度值与其邻域的像素点的灰度值做比较,如下图所示:如果邻域像素值比该点大,则赋为1,反之,则赋为0,这样从左上角开始,可以形成一个bit chain,然后将该 b

2020-07-21 21:21:30 1024

原创 什么是基线评估(Baseline Evaluation)

在CVPR2016的best paper, 也就是何凯明的Deep Residual Learning for Image Recognition一文中,对于34层残差卷积神经网络和34层普通卷积神经网络,做了对比,在对比中普通CNN被称为plain baseline(3.3开头处);ICCV2017的一篇使用GAN进行数据增强的文章Unlabeled Samples Generated by GAN Improve the Person Re-indentification Baseline in vi

2020-07-20 22:37:24 12982

原创 微表情数据集获取

SAMM数据集获取官网链接:http://www2.docm.mmu.ac.uk/STAFF/M.Yap/dataset.php邮箱地址:[email protected]协议文件:注意事项:(如图,不可以学生身份申请)SMIC数据集获取官网链接:http://www.cse.oulu.fi/SMICDatabase邮箱地址:[email protected]、CASME2、CAS(ME)^2数据集获取官网链接:http://fu.psych.ac.cn/CASM

2020-06-19 21:34:09 5073 35

原创 shape_predictor_68_face_landmarks.dat百度云下载

predictor_path = “shape_predictor_68_face_landmarks.dat”链接: https://pan.baidu.com/s/10ZZNw86SqZL3-0D2XqC6tg提取码: p2fc

2020-06-19 20:56:00 5573 3

原创 解决:pycharm python3.7成功安装dlib库

ModuleNotFoundError: No module named ‘dlib’尝试命令,但没成功pip3 install dlib -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com解决方法:第1步下载对应python3.7的whl文件:链接: https://pan.baidu.com/s/1MKqW7WH2XP-J8MOLeq3cDA提取码: rfh8第2步将下载好的whl放到当前目录下第3步

2020-06-19 20:46:46 9819 11

原创 Python和Numpy构建神经网络模型预测波士顿房价

代码所需文件housing.data链接:https://pan.baidu.com/s/1oZbuUAtnEFf44w2tkUorpg提取码:ntr1构建一个基于下图13个因素进行房价预测的模型# 导入需要用到的packageimport numpy as npimport matplotlib.pyplot as pltdef load_data(): # 从文件导入数据 datafile = './housing.data' data = np.fromfi

2020-06-11 20:30:48 3616 6

原创 解决:在原有账号的基础上如何修改CSDN博客标题上的ID号

第1步第2步第3步第4步

2020-06-05 18:07:20 815

原创 Keras上对model进行保存和提取save&reload

本代码为Python实现Keras搭建神经网络训练回归模型# Regressor save & reload exampleimport numpy as np# for reproducibilitynp.random.seed(1337)from keras.models import Sequentialfrom keras.layers import Densefrom keras.models import load_model# create some dataX

2020-06-04 22:02:50 1375

原创 Python实现Keras搭建神经网络训练Autoencoder自编码模型

# Autoencoder exampleimport numpy as np# for reproducibilitynp.random.seed(1337)from keras.models import Modelfrom keras.layers import Dense, Inputimport matplotlib.pyplot as plt# 程序中用到的数据是经典的手写体识别mnist数据集# download the mnist to the path if it is

2020-06-04 19:30:03 2228

原创 Keras框架下Batch_Size在LSTM训练与预测中的使用

batch_input_shape=(BATCH_SIZE, TIME_STEPS, INPUT_SIZE)cost, accuracy = model.evaluate(X_test, y_test, batch_size=BATCH_SIZE, verbose=False)在keras框架中,搭建时候设置了batch_size后(即在训练过程中,保持着batch_size),那么我在预测的时候也必须将test设置成batch_size的大小,否则程序会报错。...

2020-06-04 17:37:19 2348

原创 Python实现Keras搭建神经网络训练RNN回归模型

# RNN LSTM Regressor exampleimport numpy as np# for reproducibilitynp.random.seed(1337)import matplotlib.pyplot as pltfrom keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers import LSTM, TimeDistributed, Densefrom kera

2020-06-04 16:05:59 1988

原创 Python实现Keras搭建神经网络训练RNN分类模型

# RNN exampleimport numpy as np# for reproducibilitynp.random.seed(1337)from keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers import SimpleRNN, Dense, Activationfrom keras.optimizers import Adam# same as the height

2020-06-03 23:05:02 1078

原创 Python实现Keras搭建神经网络训练CNN模型

# CNN exampleimport numpy as np# for reproducibilitynp.random.seed(1337)from keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers import Dense, Activation, Conv2D, MaxPooling2D, Flattenfrom keras.optimizers import Adam.

2020-06-03 17:44:45 2186

转载 通俗理解指数加权平均

转自:https://zhuanlan.zhihu.com/p/29895933前言在深度学习优化算法中,我们会涉及到指数加权平均这个概念,下面我将通过例子来一步一步引出这个概念。平均数求法比如我们现在有100天的温度值,要求这100天的平均温度值。24,25,24,26,34,28,33,33,34,35…32。我们直接可以用公式:通过上面的公式就可以直接求出10天的平均值。而我们要介绍的指数加权平均本质上就是一种近似求平均的方法。指数加权平均我们现在直接给出公式:化简开得到如

2020-06-03 15:19:40 899

原创 Python中reshape函数参数-1的含义

# data pre-processing# normalize# X shape (60,000 28x28),表示输入数据 X 是个三维的数据# 可以理解为 60000行数据,每一行是一张28 x 28 的灰度图片# X_train.reshape(X_train.shape[0], -1)表示:只保留第一维,其余的纬度,不管多少纬度,重新排列为一维# 参数-1就是不知道行数或者列数多少的情况下使用的参数# 所以先确定除了参数-1之外的其他参数,然后通过(总参数的计算) / (确定除了参数-

2020-06-03 12:24:47 4495

原创 解决:to_categorical() got an unexpected keyword argument ‘nb_classes’

比如这段代码现在出现TypeError: to_categorical() got an unexpected keyword argument ‘nb_classes’# data pre-processing# normalizeX_train = X_train.reshape(X_train.shape[0], -1) / 255X_test = X_test.reshape(X_test.shape[0], -1) / 255y_train = np_utils.to_categoric

2020-06-02 23:20:18 1421

原创 解决:使用keras自带的MNIST数据集加载方法不可行

(X_train, y_train), (X_test, y_test) = mnist.load_data()加载mnist数据,运行时会报错解决方法:第1步下载minst.npz:链接: https://pan.baidu.com/s/1b2ppKDOdzDJxivgmyOoQsA提取码: y5ir第2步将下载好的minst.npz放到当前目录下第3步修改mnist获取语句(X_train, y_train), (X_test, y_test) = mnist.load_data

2020-06-02 23:13:07 553

原创 Python实现Keras搭建神经网络训练分类模型

# Classifier exampleimport numpy as np# for reproducibilitynp.random.seed(1337)from keras.datasets import mnistfrom keras.utils import np_utilsfrom keras.models import Sequentialfrom keras.layers import Dense, Activationfrom keras.optimizers impor

2020-06-02 23:02:39 1618

原创 Python实现Keras搭建神经网络训练回归模型

# Regressor exampleimport numpy as np# for reproducibilitynp.random.seed(1337)from keras.models import Sequentialfrom keras.layers import Denseimport matplotlib.pyplot as plt# create some dataX = np.linspace(-1, 1, 200)# randomize the datanp.ra

2020-06-02 20:39:02 4084

原创 解决:cannot import name ‘imread’ from ‘scipy.misc’

比如这段代码现在出现ImportError: cannot import name ‘imread’ from ‘scipy.misc’#GovRptWordCloudv1.pyimport jiebaimport wordcloudfrom scipy.misc import imreadmask = imread("fivestart.png")f = open("新时代中国特色社会主义.txt", "r", encoding = "utf-8")t = f.read()f.close(

2020-05-25 15:18:25 18594 7

原创 hamlet.txt英文哈姆雷特下载及实现文本词频统计

hamlet.txt全文下载:https://python123.io/resources/pye/hamlet.txtCalHamletV1.py:#CalHamletV1.pydef getText(): txt = open("hamlet.txt", "r").read() txt = txt.lower() for ch in '!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~': txt = txt.replace

2020-05-24 17:20:06 14120 8

原创 threekingdoms.txt中文三国演义下载及实现人物出场统计

threekingdoms.txt全文下载:https://python123.io/resources/pye/threekingdoms.txtCalThreeKingdomsV1.py:#CalThreeKingdomsV1.pyimport jiebatxt = open("threekingdoms.txt", "r", encoding = "utf-8").read()words = jieba.lcut(txt)counts = {}for word in words:

2020-05-24 17:16:38 6094 4

原创 解决:Invalid format specifier

一定是你format函数中某一占位少了,或者格式不对(位置问题)

2020-05-12 17:23:31 9258 1

原创 python中ctime和gmtime获取的时间不一样

time.ctime()和time.gmtime()获取的时间不一样原因是ctime()获取的时间是系统时间(北京时间)而gmtime()获取的时间是格林尼治时间(英国的标准时间)对于我们而言,两者之间有8小时时差

2020-05-12 16:53:16 2094

原创 c++ vector的size()返回值是unsigned int型

c++ vector的size()返回值是unsigned int型赋给int最好强制转换一下int n = (int)prices.size();

2020-05-12 16:47:06 1333

原创 解决:python3类定义写法,(self, nums: List[int]) -> int:

class Solution: def arrayPairSum(self, nums: List[int]) -> int: return sum(sorted(nums)[0::2])这段代码是LeetCode上的,我没有接触过这种定义写法。这是新增的语法,为了说明参数和返回值的数据类型。不过仅仅的给人看的,实际上程序并不检查是否是相符的。故意写错了,一样可以正常运行。def fun(x: int) -> str: return [x]>&

2020-05-10 16:18:21 25084 4

原创 爬虫框架Scrapy的安装(图文教程)

第1步安装lxml(这个最重要)pip3 install lxml第2步安装pyOpenSSL在官网下载wheel文件点此下载下载后进入该文件所在目录使用pip3 install pyOpenSSL-19.1.0-py2.py3-none-any.whl第3步安装Twisted在控制台下输入python查看你的电脑版本和python版本如下图我电脑是64位p...

2020-04-29 17:50:30 549

原创 Matlab二维正态分布可视化

高维分布一直都是一个很抽象的概念,本人在学的时候很多概念不太能理解,于是使用了Matlab进行了可视化。并对均值、方差以及相关系数进行了调整。图中x,y为两个变量的取值,z为出现的概率密度。x=-20:0.5:20;y=-20:0.5:20;u1 = 0; %均值u2 = 0; sigma1 = 2; %方差sigma2 = 2;rou =...

2020-04-29 16:30:33 1222 1

转载 似然(likelihood)和概率(probability)的区别与联系

转自:https://www.cnblogs.com/zongfa/p/9295455.html在数理统计学中,似然函数是一种关于统计模型中的参数的函数,表示模型参数中的似然性。似然函数在统计推断中有重大作用,如在最大似然估计和费雪信息之中的应用等等。“似然性”与“或然性”或“概率”意思相近,都是指某种事件发生的可能性,但是在统计学中,“似然性”和“或然性”或“概率”又有明确的区分。概率用于在...

2020-04-29 15:56:33 2391

原创 李宏毅机器学习2017 拟合宝可梦CP值代码 GradientDescentDemo 并利用adagrad进行优化

import matplotlib.pyplot as pltimport numpy as np# 进化前CP数据(10组)x_data = [338., 333., 328., 207., 226., 25., 179., 60., 208., 606.] # 进化后CP数据(10组)y_data = [640., 633., 619., 393., 428., 27., ...

2020-04-16 11:01:53 568

转载 交叉验证法

转自:https://zhuanlan.zhihu.com/p/35394638交叉验证法的作用就是尝试利用不同的训练集/测试集划分来对模型做多组不同的训练/测试,来应对单词测试结果过于片面以及训练数据不足的问题。交叉验证的做法就是将数据集粗略地分为比较均等不相交的k份,即然后取其中的一份进行测试,另外的k-1份进行训练,然后求得error的平均值作为最终的评价,具体算法流程西瓜书中的插图...

2020-04-16 07:20:28 1188

空空如也

空空如也

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

TA关注的人

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