自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 吴恩达 卷积神经网络

卷积神经网络卷积操作:设输入n,filter为f,padding为p,步长(stride) 为s则卷积(不满足结合律,满足结合律还需要对filter进行水平和垂直翻转)之后图像大小为 (n+2p-f)/s + 1 向下取整RGB图像卷积操作:同时相乘相加,三个channel输出一个值为什么CNN可以避免过拟合?A:一个有十个filt...

2019-04-19 11:43:55 206

原创 吴恩达 神经网络 深度学习

2.1 二分分类pixel 像素rgb 0-255表示 红绿蓝的程度64*64的图像,输入就是64*64*3的向量要利用reshape来避免产生(n,)的数组,A.resahpe(n,1)即可3.*tanh比sigmoid绝大多数表现好(平移是一样的)tanh‘(0)=1激活函数必要性:否则就只是输入的线性组合,隐藏层失去意义relu输入为0...

2019-04-19 11:43:24 148

原创 记录在MacOS下,使用anaconda+tensorflow+keras进行开发实验中的若干注意事项

 由于在不断学习,所以这个博文也会不断进行更新 1. 安装与配置安装anaconda,感觉带不带Navigator无所谓,因为到现在都是用vs code写代码,然后命令行运行安装anaconda后,配一下你想要的python环境,最好最新吧,我用的是python 3.7,-n表示一个名字conda create -n py37 python=3.7然后命令行激活环境,...

2019-02-26 15:35:16 588 1

原创 软件工程-项目总结——使用javascript对有行列合并的表格进行操作的方式

这个东西网上还真没有,自己琢磨的不少时间,真的有点类似于oi的题目一样,最后实现方式是将整个表格映射到一个二维数组,按照一定的扫描次序进行table扫描,之后进行操作。下面是删除行或者列的操作,仅供大家参考:这里第一行和第一列添加了checkbox,勾选checkbox删除,同时checkbox也能保证你表格行列获取一定是正确的。function Delete(table){ for(va

2016-12-15 14:11:02 337

原创 阿里云Centos搭建java全攻略(jdk1.8+tomcat9.0+mysql5.7)

由于项目需要部署到服务器,但是学校课程推荐的新浪云收费较高,所以最新购买了阿里云,现在还有优惠活动(9块钱买一年云存储oos赠送半年云服务器cse,现在还可以,手慢无)服务器相关配置推荐64位Centos,但是第一次选错了也没关系,可以通过停止实例后再更换系统盘,这里说明一下,windows有一个好处就是可以远程桌面连接,这样就能够相当于你在本地可视化操作,但是linux只能够通过终端控制。但还是看

2016-12-15 13:53:16 7698 1

原创 软件工程-项目总结——基础类的实现

首先是model首先想好每一个model在项目中都需要哪些private属性,然后通过eclipse中的Source->Generate Getter and Setter功能自动生成get和set函数。 这样model类中的工作就完成了。其次是serviceservice层是为了model层服务的,所以我们应该针对model中的属性来实现对应的功能,比如对于user类,可以在service中实现

2016-12-11 15:34:39 510

原创 软件工程-项目总结——项目架构

经过商讨,后台java代码package确定为四个action:存放action类model:存放对象类:用户,邮件等等service:存放服务类:用户服务,邮件功能实现等等security:存放安全辅助类,例如 密码邮箱MD5加密模块而jsp页面的结构采取: 主页->功能页面->表格提取页面->表格展示页面(包含导出功能)另外,用户jsp页面,用户辅助功能(注册,邮件发送,忘记密码……

2016-12-11 15:17:15 690

原创 git实战1

git的功能实在是强大,掌握了git之后,仿佛人生获得了新生。 git的系统学习强烈推荐:Git教程-廖雪峰一 .git的安装 在mac上,如果你安装了xcode,并且也安装了commnd line tool ,那么你的系统中就已经有了git了 (如果没有安装xcode,可以通过homebrew安装,或者官网,但是这里推荐安装一个xcode,毕竟mac下功能最强大的code ide) git

2016-10-17 17:08:12 272

原创 在mac环境下eclipse中struts2一些配置的问题

struts配置:http://struts.apache.org/download.cgi eclipse中设置中找到build path配置加入一系列jar文件struts下载文件,eclipse中设置中找到build path配置加入一系列jar文件mysql设置:在这里mac的eclipse或许没有data相应的设置属性,所以需要特别安装相应软件安装软件

2016-09-16 18:04:56 1018

原创 hdu2896-ac自动机

这个加入了记录编号就是把原来的那个记录次数的改成记录标号不要忘记每一次init不要忘记build不要忘记数组开的大小直接查询的话,是不能保证按照原来顺序的,所以找到所有答案之后应该再排一下顺序#include #include #include #include #include using namespace std;const int MAX=220*500

2015-09-04 16:03:27 322

原创 hdu5384-多校 ac自动机

先读匹配串,后读模板串,所以需要先把之前的存下来,用char存的方法就是开一个长一些的char,存到同一个字符串里面,具体看代码,然后是可以重复匹配的#include #include #include #include #include using namespace std;const int MAX=100005;struct Trie{ int

2015-09-04 15:11:23 342

原创 ac自动机模板-kuangbin

hdu2222#include #include #include #include #include using namespace std;const int MAX=500005;struct Trie{ int next[MAX][26],fail[MAX],end[MAX]; int root,L; int newnode()

2015-09-04 14:31:29 676

原创 trie模板 -hdu1251

#include #include #include using namespace std;struct trie{ int cnt=0; trie *next[26]; trie(){memset(next,NULL,sizeof(next));}}s;void add(char *str){ trie *Tree=&s; s.cnt++

2015-09-03 17:13:58 306

原创 kmp模板---poj3461

#include #include #include #include #include using namespace std;char a[1000005],b[10005];int p[1000005];int main(int argc, const char * argv[]){ int i,j,m,n; int T; cin>>T; w

2015-09-03 15:45:12 244

原创 hdu 5411 多校——矩阵快速幂模板

#include #include #include using namespace std;const int N = 52;long long ans=0;struct Mat { int mat[N][N];};int num[N];int n, m;Mat a;void init() { int i,j; int x,k; me

2015-08-20 21:12:55 337

原创 多校数论题-CRB and Candies

Problem DescriptionCRB has N different candies. He is going to eat K candies.He wonders how many combinations he can select.Can you answer his question for all K(0 ≤ K ≤ N)?CRB is too hu

2015-08-20 20:09:43 791

原创 2015 Multi-University Training Contest 9-1007 Travelling Salesman Problem

Problem DescriptionTeacher Mai is in a maze with n rows and m columns. There is a non-negative number in each cell. Teacher Mai wants to walk from the top left corner (1,1) to the bottom rig

2015-08-19 10:01:35 565

原创 一定要注意特殊情况!!!POJ1845

求A^B的所有因子的和(A,B<=50000000)把A分解最后就是cnt个等比数列求和再相乘然而用等比数列求和公式的时候,有可能因子 mod 9901之后得1,等比数列公式就不对了所以需要特殊判断,也就是这里卡了我很久很久。。。#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>using na

2015-08-17 20:26:04 388

原创 线段树(区间修改,区间求和)

lzay标记,注意query和updata的时候都需要push,并且push的位置不同#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int MAXN=100005;struct node{ int l,r; long long sum,tag;}s[4*

2015-08-15 17:36:09 1090

原创 HDU1823(二维线段树)

区间 查询+单点修改注意二维添加操作#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int MAXN=205;const int MAXM=1005;struct node{ int l,r,max;};struct tree{ node sub[4

2015-08-15 16:29:40 347

原创 二维线段树

二维线段树矩阵区间查询最大值 /* 矩阵求和预处理后O(1)就能算出来,不用线段树,除非有修改操作 */先第一维在第二维,注意建树有个顺序问题, 应该让第一维度的先建完然后再建第二个维度 具体看代码#include <iostream>#include <cstdio>#include <algorithm>using namespace std;const int MAXN=10

2015-08-15 11:05:51 595

原创 线段树求和,最大公约数

//// main.cpp// newday//// Created by 耿飞 on 15/8/14.// Copyright (c) 2015年 耿飞. All rights reserved.//#include <iostream>#include <cstdio>#include <algorithm>#include <cmath>#include <set>

2015-08-14 19:33:16 514

原创 CF 316div2 E.Pig and Palindromes

E. Pig and PalindromesPeppa the Pig was walking and walked into the forest. What a strange coincidence! The forest has the shape of a rectangle, consisting of n rows and m columns. We enumerate the row

2015-08-14 14:39:06 1237

原创 poj1753

翻转棋,枚举所有情况 加入一些位运算 x^1可以实现0变1,1变0 x&1可以取最后一位 0-65535循环一遍//// main.cpp// poj1753//// Created by 耿飞 on 15/8/12.// Copyright (c) 2015年 耿飞. All rights reserved.//#include <iostream>#include

2015-08-12 15:52:20 295

原创 Manacher算法:

http://blog.csdn.net/ggggiqnypgjg/article/details/6645824/hdu3068

2015-08-12 09:33:34 276

原创 点的旋转

任意点(x,y),绕一个坐标点(rx0,ry0)逆时针旋转a角度后的新的坐标设为(x0, y0),有公式:x0= (x - rx0)*cos(a) - (y - ry0)*sin(a) + rx0 ;y0= (x - rx0)*sin(a) + (y - ry0)*cos(a) + ry0 ;

2015-08-10 20:13:06 581

原创 二分图带权匹配

#include <cstdio>#include <memory.h>#include <algorithm> // 使用其中的 min 函数using namespace std;const int MAX = 405;int n; // X 的大小int weight [MAX] [MAX]; // X 到 Y 的映射(权重)int lx [M

2015-08-10 20:12:27 464

原创 sprintf

printf就是把后面的东西写入到屏幕,而sprintf就是把后面的东西格式化为字符串写入到字符串中具体用法举例:sprintf(s,”% 20.5f”,100.0);printf(“%s\n”,s)屏幕输出“ 100.00000”sprintf(s,”% 20.5d”,100);printf(“%s\n”,s)屏幕输出“ 0.00000”原因是100没有

2015-08-10 20:11:18 808

原创 模拟退火——模板

#include <cstdio>#include <cmath>#include <algorithm>const double lim=0.999999;const double eps=1e-2;const double pi=3.141592653589793;double tmp,maxx,minx,maxy,miny,lx,ly,dif;int n,ns,nc;double ans;us

2015-08-10 20:09:51 603

原创 计算几何模板 ——求多边形有多少条对称轴

#include <cstdio>#include <cmath>#include <set>#include <algorithm>using namespace std;const double eps=1e-8;const double pi=3.141592653589793;inline int cmp(double x){ if (fabs(x)<eps) return 0;

2015-08-10 20:09:18 1053

原创 字符串hash

unsigned int ELFHash(char *str){ unsigned int hash = 0; unsigned int x = 0; while (*str) { hash = (hash << 4) + (*str++); if ((x = hash & 0xF0000000L) != 0) {

2015-08-10 20:08:05 375

原创 poj2001字典树

#include <cstdio>#include <cstring>using namespace std;typedef char st[22];st str[20003];st s;int p=0;struct tree_node{ int count; tree_node *next[26];}root ,node[20003];void insert(char *word){

2015-08-10 20:07:05 344

原创 A Bug's Life(分组并查集 奇偶表)

Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gend

2015-08-10 20:04:52 347

原创 二维树状数组

#include <cstdio>#include <cstring>using namespace std;int s[1050][1050],n;int lowbit(int x){ return (x& -x);}void insert(int x,int y,int m){ int i,j; for (i=x;i<=n;i+=lowbit(i)) for (j=y;j

2015-08-10 20:02:54 318

原创 一维的树状数组

#include <cstdio>#include <cstring>using namespace std;int s[50005],n;int lowbit(int x){ return (x& -x);}void insert(int x,int m){ while (x<=n) { s[x]+=m; x+=lowbit(x); }}int

2015-08-10 20:02:24 322

原创 c风格字符串

#include <iostream>#include <cstring>using namespace std;struct dd{ int a;double b;};struct aa{ dd t,q;};struct qq{ aa o;};int main(){ qq z[10]; z[0].o.t.a=10;//结构体的嵌套格式 std::ios::syn

2015-08-10 20:01:45 269

原创 HOJ1062 贪心+优先队列

#include <cstdio>#include <queue>using namespace std;main(){ int n,i,k;int a[50002]; scanf("%d",&n); while(n!=0) { for (i=1;i<=n;i++) scanf("%d",&a[i]); priority_queue<int,vec

2015-08-10 19:59:30 276

原创 优先队列——重载运算符

#include#include#include #define PQ priority_queueusing namespace std;struct sq{ int a,b; friend bool operator < (sq x,sq y){ return x.a>y.a;}};int main(){

2015-08-10 19:57:28 797

原创 结构体排序

#include <iostream>#include <algorithm>using namespace std;struct st{ int a,b;};bool cmp(st x,st y){ if (x.a>y.a) return 1; else return 0;}int main(){st s[10];int i;for (i=0;i<10;i++){ s[i

2015-08-10 19:55:24 306

原创 带模除法

What day is that day?It's Saturday today, what day is it after 11 + 22 + 33 + ... + NN days?InputThere are multiple test cases. The first line of input contains an integer T indicating t

2015-07-19 13:24:49 1444

空空如也

空空如也

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

TA关注的人

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