自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 决策树的c++实现

#include#include#include#include#include#include "jcs.h"using namespace std;void predict(jctree&jc,vector&hind, vector&attr);void predict1(jctree jc, vector&a, vector&hind,vector&attr);jct

2017-07-24 13:55:21 768

原创 关于c++类的赋值的问题

class jctree{public: jctree(string na, bool is, int res, int co = 0) :name(na), is_leaf(is), result(res) ,count(co) {} string name; jctree operator = (jctree& jc) { jctree c(jc.name,

2017-07-24 13:47:47 634

原创 caffe install

http://blog.csdn.net/xierhacker/article/details/53035989      ubuntu16.04 cuda8.0

2017-07-22 22:02:17 218

原创 caffe study

利用caffe 用自己的数据集在imagenet网络中实践:file:///media/llk/My%20Passport/ubuntu%E8%B5%84%E6%96%99/caffe/%E6%96%87%E6%A1%A3/%E5%88%A9%E7%94%A8caffe%20%E7%94%A8%E8%87%AA%E5%B7%B1%E7%9A%84%E6%95%B0%E6%8D%AE%E9%9B%8

2017-07-22 21:57:54 280

原创 实现组合算法

#include #include#includeusing namespace std;void cho(vector&r, vector&a, int n1, int n2, int m, vector>&b){ if ((n2 - n1 + 1) < m) return; if (n2 - n1 + 1 == m) { for (int i = n1; i <

2017-07-18 20:18:34 235

原创 已知前序中序求后续

#include#includecharpre[26];charin[26];charpost[26];        /**三个low和high分别是pre,in和post的起止位置*/voidPost(intlow1,inthigh1,intlow2,inthigh2,int

2017-06-14 15:29:53 415

原创 24点游戏

输入四个数1-13,加减乘除得到24:#include #include#include #include"cal.h"using namespace std;bool isp(char c){ if (c == '+' || c == '-' || c == '*' || c == '/') return true; else return false;}voi

2017-06-03 22:52:15 345

原创 计算表达式

中序转后序:#include #include #include #include#includeusing namespace std;#define MAX 50struct node{ double i; char c; bool t;}; bool isdigit(char c){ if ((c >= '0'&&c <= '9') ||

2017-06-03 22:16:05 376

转载 全排列

#include #include #include using namespace std; #define MAX_SIZE 5 void swap(vector &lst, int i, int j) { int tmp = lst[i]; lst[i] = lst[j]; lst[j] = tmp; }

2017-06-03 20:22:22 166

原创 matlab随记

randperm(5)  %随机打乱1 2 3 4 5,返回打乱的顺序;                                   round() %四舍五入   floor(5.5)=5;                   ceil(5.1)=6;

2016-10-30 15:00:25 162

原创 看不懂的python矩阵处理

X_vec_squared = np.diag( np.dot(X, X.transpose()) )    X_train_vec_squared = np.diag( np.dot(self.X_train, self.X_train.transpose()) )    X_X_train = -2*np.dot(self.X_train, X.transpose())

2016-10-23 14:47:48 377

原创 用位运算实现两个整数的加减乘除运算

位运算的思想可以应用到很多地方,这里简单的总结一下用位运算来实现整数的四则运算。1.整数加法想法:对于整数a+1其实就是 从最左边第一位开始1变0,直到从右向左发现有0位,将其变为1。a+b  可以考虑为 将b从右向左开始每次从出现1位的地方开始加给a。    实现过程(上机失败,求解)  第二次同样程序又成功了,怪了int  add(int a, int b){f

2016-10-22 22:18:31 419

原创 概略

np.dot(a,b) 矩阵相乘           X.transpose()   np里的转置np.diag()用法如下:>>> xarray([[0, 1, 2], [3, 4, 5], [6, 7, 8]])>>>>>> np.diag(x)array([0, 4, 8])>>> np.diag(x, k=1)

2016-10-22 16:05:45 268

转载 np.linalg

np.linalg.norm顾名思义,linalg=linear+algebra,norm则表示范数,首先需要注意的是范数是对向量(或者矩阵)的度量,是一个标量(scalar):首先help(np.linalg.norm)查看其文档:norm(x, ord=None, axis=None, keepdims=False)11这里我们只对常用设置进行说明,x表

2016-10-22 14:49:41 389

原创 plt实例

classes = ['plane', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']num_classes = len(classes)samples_per_class = 7for y, cls in enumerate(classes):    idxs = np.flatnonz

2016-10-21 16:42:06 522

原创 numpy使用中随机

X = X.reshape(10000, 3, 32, 32).transpose(0,2,3,1).astype("float")   解释:#(10000,32,32,3)    >>> x = np.ones((1, 2, 3))>>> np.transpose(x, (1, 0, 2)).shape(2, 1, 3)>>> x = np.array([1, 2, 2.5

2016-10-21 15:23:03 381

原创 numpy.transpose 使用问题

最近用了矩阵转置 numpy.transpose(),发现了一点有趣的现象:[python] view plain copyx=linspace(0,4,5)  array([0.,1.,2.,3.,4.])[python] view plain copyx.shape  (5,

2016-10-21 15:13:12 615

原创 numpy入门

https://docs.scipy.org/doc/numpy/reference/generated/numpy.reshape.htmlhttp://old.sebug.net/paper/books/scipydoc/numpy_intro.html>>> c = np.array([[1, 2, 3, 4],[4, 5, 6, 7], [7, 8, 9, 10]])

2016-10-21 14:41:42 154

原创 Visualizing and Understanding Convolutional Networks

论文:https://arxiv.org/abs/1311.2901http://videolectures.net/eccv2014_zeiler_convolutional_networks/解释:http://www.gageet.com/2014/10235.phphttp://blog.csdn.net/tina_ttl/article/details/5

2016-10-17 16:20:02 147

原创 cPickle

http://www.cnblogs.com/cobbliu/archive/2012/09/04/2670178.html

2016-10-15 17:03:52 585

转载 KNN

http://blog.csdn.net/xlm289348/article/details/8876353

2016-10-15 15:58:53 130

原创 python使用基础随记

import os#获取当前工作目录>>>os.getcwd()#更改当前工作目录>>>os.chdir('d:\')

2016-09-22 20:29:30 179

空空如也

空空如也

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

TA关注的人

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