自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

kesonyk的专栏

勇气与专一

  • 博客(98)
  • 资源 (7)
  • 收藏
  • 关注

原创 使用VGG训练Imagenet

使用VGG训练Imagenet准备数据具体官网地址,请点击这里ImageNet官网训练数据集:ILSVRC2012_img_train.tar验证数据集:ILSVRC2012_img_val.tar数据解压sudo tar –xvf ILSVRC2012_img_train.tar -C ./train sudo tar –xvf ILSVRC2012_img_val.tar -C ./val对

2016-12-22 19:31:05 27777 3

原创 在Jetson TX1上用YOLO训练VOC2007

在Jetson TX1 上训练darknet本文介绍在Jetson TX1上用VOC2007数据集训练YOLO。Reference:YOLO主页1 下载数据集Pascal VOC 数据集是一个用来进行目标检测的数据集,官网链接pascal voc从上面下载VOC2007 的数据集,解压后放到 /darknet/scripts 2 修改scripts下的voc_label.py可以用来将voc数据集

2016-12-10 16:18:23 2986 3

原创 深度学习中的初始化

深度学习中的初始化layer { name: "conv1" type: "Convolution" bottom: "data" top: "conv1" param { lr_mult: 1 } param { lr_mult: 2 } convolution_param { num_output: 32 pad: 2

2016-12-06 18:34:20 1563

原创 Protocol Buffers 详解1

Protocol Buffers 详解1欢迎放我的博客空间: https://satisfie.github.io/Reference:Protobuf GitProtobuf 安装Google Developer Guideproto文件格式下面这个翻译已经翻译的很详细Protobuf 语言指南翻译Protocol Buffers 是一种与语言无关,平台无关,可扩展的轻便高效的数据存储格式,用于

2016-12-03 17:16:16 969

原创 动态规划04—最长的zigzag序列

topcode链接: https://community.topcoder.com/statc=problem_statement&pm=1259&rd=4493 problem:A sequence of numbers is called a zig-zag sequence if the differences between successive numbers strictly alt

2016-05-10 22:10:56 1993

原创 动态规划02—凑硬币

动态规划的第二个例子:凑硬币 给定面值为1元,3元,5元的硬币若干枚,用最少的硬币,凑给定数目的钱。 分析: 同样,若需要凑20元的钱,可以分解成更小的钱(19,17,15)。一个较大的问题可以分成小的问题,只是规模减小,本质上还是同一个问题,满足最优子结构问题;且子问题存在重叠,可见满足动态规划的特点; 在此问题中: 状态为d[i]=j,含义是凑i元钱需要j个硬币。 状态转移方程为:q

2016-05-09 22:27:40 796

原创 动态规划01-钢条切割问题

动态规划(dynamic programming)与分治算法相似,都是通过组合子问题的解来求解原问题。区别在于,分治算法是将原问题划分为互不相交的子问题,递归求解子问题,再把它们的解组合起来,求出原问题的解;动态规划应用于子问题重叠的情况,即不同的子问题具有公共的子问题(子问题的求解是递归进行的,将其划分为更小的子子问题),在这种情况下,分治算法会反复求解那些公共的子问题,而动态规划算法对每个子子问

2016-05-09 15:31:14 1567

原创 C++11 中的单例模式

Singleton—对象创建型模式 意图:保证一个类只有一个实例。对一些类来说,只有一个实例是很重要的。虽然系统中有许多打印机,但却只应该有一个printer spooler,只应该有一个文件系统和一个窗口管理器。 Singleton模式有许多优点: 1)对唯一实例的受控访问 2)缩小名空间 3)允许对操作和表示的精化 4)允许可变数目的实例 5)比类操作更灵活 《设计模式》书中对

2016-04-27 21:18:44 613

转载 Thrift RPC详解

转自http://zheming.wang/thrift-rpcxiang-jie.htmlZhemingHomeCategoriesTagsArchivesAboutPublicationThrift RPC详解原创声明:本作品采用知识共享署名-非商业性使用 3.0 版本许可协议进行许

2016-03-18 16:13:49 27865 4

原创

维护堆的性质MAX-HEAPIFY是用于维护最大堆性质的重要过程。输入为待维护的数组,与待维护的节点i。时间复杂度为O(lgn),即树的高度hMAX_HEAPIFY(A,i) l=LEFT(i) r=RIGHT(i) if l<=A.heapSize and A[l]>A[i] largest=l else largest=i if r<=A.

2015-12-14 15:53:46 390

转载 CRF++ 条件随机场使用

1. 简述    最近要应用CRF模型,进行序列识别。选用了CRF++工具包,具体来说是在VS2008的C#环境下,使用CRF++的windows版本。本文总结一下了解到的和CRF++工具包相关的信息。    参考资料是CRF++的官方网站:CRF++: Yet Another CRF toolkit,网上的很多关于CRF++的博文就是这篇文章的全部或者部分的翻译,本文也翻译了一些

2015-08-27 22:58:13 1322

原创 C++便利文件夹下文件

void DataProvider::searchFile(){ struct dirent *ptr; DIR *dir; const char *path=filePath.c_str(); dir=opendir(path); while((ptr=readdir(dir))!=NULL){ //filePrefix=IC|IF|IH if(filePrefix.s

2015-08-17 10:16:01 646

原创 leetcode 第21题 两个有序列表的合并

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */class Solution {public: ListNode* me

2015-08-11 15:46:34 676

原创 计算最小编辑距离

#include #include #include #include #include using namespace std;int levenShtein(string s1,string s2){ int cel=s1.size(); int row=s2.size(); if(cel==0) return row; if(row==0) return

2015-08-09 12:59:19 610

原创 leetcode 第15题,三个数的和

这题目和两个数的和求法一样,多了一层遍历,所以复杂度为O(n^2)重要的地方是防止重复vector的push,所以要检测是否重复#include #include #include using namespace std;vector> threeSum(vector& nums) { vector> ret; if(nums.empty()) return

2015-07-25 20:37:44 510

原创 leetcode 第14题 Longest Common Prefix

这题很简单,只需要做一个简单的遍历即可#include #include #include using namespace std;string longestCommonPrefix(vector& strs) { if(strs.empty()) return ""; string comstr=strs[0]; for(int i=1;i!=strs.

2015-07-25 19:11:18 448

原创 leetcode第11题

Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Fin

2015-07-24 15:13:05 1100

原创 leetcode第9题,判断数字是否是回文数字的两种方法

class Solution {public: bool isPalindrome1(int x) { if(x<0) return false; vector vec; while(x) { vec.push_back(x%10); x=x/10;

2015-07-23 23:48:37 499

原创 leetcode第6题—zigZag

LeetCode第六题zigZag的简单解法这题目是一道简单的找规律的题目0 10第1行两个数之间的间隔为 10,10,101 911 第2行两个数之间的间隔为8,2,8,22 812 第3行两个数之间的间隔为6,4,6,43 713 第4行两个数之间的间隔为4,6,4,64 614 第5行两个数之间的间隔为2,8,2,85 15第6行两个数

2015-07-23 19:41:59 568

原创 leetcode第五题—最长回文字符串

最长回文字符串(Longest Palindromic Substring )1.中心结点法,时间复杂度为O(n^2)回文字符串都是对称的,有两种对称方式,一是关于字符对称,比如a,aba,cabac,这种回文字符串长度都是奇数;二是关于间隔对称,比如aa,abba,cbaabc,这种回文字符串长度都是偶数,所以要分别检测这两种情况。中心结点法,就是遍历整个字符串,分别

2015-07-23 17:52:53 2100

原创 带有O(1)时间返回最小值的stack

主要是在辅助的栈中push当前最小的值,若data栈pop出的数不是当前最小的,则辅助栈不动;若data栈pop出当前最小的值,则辅助栈也pop#include #include using namespace std;templateclass minStack{public: void push(object val) { data.push_back(val);

2015-07-22 14:06:03 563

原创 二叉树转为有序列表

#include struct BinaryBode{ int val; BinaryBode *left; BinaryBode *right; BinaryBode(int v=0,BinaryBode *lt=nullptr,BinaryBode *rt=nullptr) :val(v),left(lt),right(rt) { }};//创建时传递的一定是指针引用,

2015-07-22 13:40:45 773

原创 Longest Substring Without Repeating Characters —leetcode第三题

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo

2015-07-21 14:29:51 277

原创 开始刷刷Leetcode—leetcode第二题

描述You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return

2015-07-20 21:30:12 321

原创 算法导论—广度优先算法

#include #include #include #include #include using namespace std;enum{WHITE,GRAY,BLACK};struct Vertex{ int color; int d; int pre; Vertex() :pre(-1),color(WHITE),d(INT_MAX) { }};cla

2015-07-19 23:45:13 379

原创 算法导论—最长公共子序列

#include #include #include #include #include using namespace std; vector> lcsLen(const string &s1,const string &s2){ int m=s1.size(); int n=s2.size(); vector> C(m+1,vector(n+1)); for(int

2015-07-19 00:25:47 382

原创 算法导论,最优钢条切分

#include #include #include #include #include using namespace std;int memoryCutAux(vector &p,int n,vector &r){ int q; if(r[n]>=0) return r[n]; if(n==0) q=0; else { q=INT_MIN; fo

2015-07-18 15:34:33 390

原创 利用gensim主题模型寻找相似的coursera课程

参考http://www.52nlp.cn/如何计算两个文档的相似度三#encoding=utf-8from nltk.tokenize import word_tokenizefrom nltk.corpus import stopwordsfrom nltk.stem.lancaster import LancasterStemmercourses=[line.strip() f

2015-06-26 15:08:22 831

原创 gensim的LSI模型来计算文档的相似度

from gensim import corpora,models,similaritiesdictionary=corpora.Dictionary.load('/tmp/deerwester.dict')corpus=corpora.MmCorpus('/tmp/deerwester.mm')print(corpus)lsi=models.LsiModel(corpus,id2wor

2015-06-26 01:28:15 4619

原创 gensim的主题模型LSI

将上问的输入文档归为两个主题from gensim import corpora,models,similaritiesdictionary=corpora.Dictionary.load('/tmp/deerwester.dict')corpus=corpora.MmCorpus('/tmp/deerwester.mm')print(corpus)tfidf=models.TfidfM

2015-06-26 00:50:23 3771

原创 使用gensim计算文档的相似度

gensim是一个主题模型的python库,可以在官网下载http://radimrehurek.com/gensim/index.html以下代码使用gensim来计算文档之间的相关性,使用的是tfidf模型。文档在下面用一句话代替from gensim import corpora,models,similarities#nine documents,each consistin

2015-06-25 23:38:56 2775

原创 smo算法的c++实现

#include #include #include #include #include #include #include #include #include #include #include using namespace std;using namespace Eigen;class svm{public: EIGEN_MAKE_ALIGNED_OPER

2015-06-11 11:19:51 1644

原创 SVM算法2

线性可分支持向量机学习算法输入:线性可分训练集T={(x1,y1),(x2,y2),...,(xN,yN)}T=\{(x_1,y_1),(x_2,y_2),...,(x_N,y_N)\} 其中xi∈Rn,yi∈{−1,+1},i=1,2,..,Nx_i \in \bf R^n,\it y_i \in \{-1,+1\},\quad i=1,2,..,N 输出:分离超平面和分类决策函数 (1)构造

2015-06-09 21:18:26 672

原创 SVM算法1

支持向量机(support vector machines,SVM)是一种二类分类模型,它的基本模型是定义在特征空间上的间隔最大的线性分类器,支持向量机还包括核技巧,这使它成为实质上的非线性分类器。支持向量机的学习策略就是间隔最大化,可形式化为一个求解凸二次规划(convex quardratic)的问题,也等价于正则化的合页损失函数的最小化问题。 支持向量机学习方法包含构建由简到繁的模型,

2015-06-07 21:46:50 3030

原创 Logistic回归模型的训练与测试,C++ 实现

#include #include #include #include #include #include #include #include #include #include using namespace std;void loadDataset(vector> &dataMat,vector &labelMat,const string &filename){

2015-06-03 14:09:40 1426 1

原创 Logistic回归模型的Python及C++实现

一.基于Logistic回归和Sigmoid函数的分类优点:计算代价不高,易于理解和实现 缺点:容易欠拟合,分类精度可能不高 适用数据类型:数值型和标称型数据1.1逻辑斯谛分布分布函数为: F(x)=P(X≤x)=11+e−(x−u)/γF(x)=P(X\leq x)= \frac{1}{1+e^{-(x-u)/\gamma}} 密度函数为: f(x)=e−(x−u)/γγ(1+e−(x−

2015-06-01 19:49:28 4575 2

原创 平方探测哈希表

#include #include #include #include using namespace std; template class HashTable{public: explicit HashTable(int size=101) :theSize(nextPrime(size)),array(nextPrime(size)) { makeEmpt

2015-05-25 20:19:24 564

原创 单链表反转

#include #include using namespace std;templateclass linkList{private: struct Node { Object data; Node *next; Node(const Object &d=Object{ },Node *n=nullptr) :data(d),next(n) { }

2015-05-20 14:26:22 432

原创 线性时间选出一个数组中第i大的数

利用快排的partition,在线性时间内,选择出第i大的数templateint qPartition(vector &vec,int p,int r){ uniform_int_distribution u(p,r); default_random_engine e(32676); int pos=u(e); std::swap(vec[pos],vec[r]); int key

2015-05-19 17:48:44 488

原创 算法导论6.5-9,K个有序链表合并 nlgn

#include #include #include #include using namespace std;templateclass minKList{public: explicit minKList(int capacity=100) :array(capacity+1),currentSize(0) { } explicit minKList(const

2015-05-18 12:27:40 659

darknet.conv.weights

darknet 权重

2016-12-10

语音识别基本原理 经典之作

国外的语音识别开山之作,非常值得一看,书已经绝版了

2014-12-25

北邮宽带通信网原理

北邮出的 宽带通信网原理 国内比较全的一本书,近600页

2014-12-25

数据结构与算法分析 4th,高清pdf及源码

数据结构与算法分析C++描述第四版的英文pdf,高清,以及本书源码,对于学习C++,数据结构的同学很有帮助,用C11标准写的

2014-11-18

谷歌C++编程规范

Google 的C++编程规范,中文版,清晰,对于养成良好的编程规范很有帮助

2014-11-18

硬件工程师手册

硬件工程师手册,华为内部资源,硬件工程师应当了解的知识。不错的介绍

2012-11-14

空空如也

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

TA关注的人

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