自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 线程同步——两个线程轮流执行python实现

import threadingimport timelockA=threading.Lock()lockB=threading.Lock()def printA(n): if n<0: return lockA.acquire() print("+++") lockB.release() time.sleep(0.1) printA(n-1)def...

2018-03-31 22:34:08 3099

原创 后缀自动机SAM笔记和模板

以下是模板:#include<stdio.h>#include<string.h>//后缀自动机Suffix Automaton/* 注意: (1)CHARSZ是字符个数 idx()可以对字符进行编码。默认只接受小写字母 (2)调用SAM::buildSAM即可建树 (3)调用SAM::clearSAM清空内存。*/#define CHARSZ ...

2018-03-26 16:06:13 440

原创 [python]线性回归实现linear regression

#线性回归,梯度下降法#by cjf@xmu#参数n个点,返回线性方程参数a,b,y=ax+bimport mathdef linear(points): a=10.0 b=1.0 learning_rate=1e-2 #loss=1/(2n)*sigmal(sqr(a*xi+b-yi)) #求loss对a,b的偏导,梯度下降法 while True: ...

2018-03-13 16:15:09 499

原创 [Tensorflow] 网络局部restore 以及 网络局部训练

网络架构如下:参数为a1,a2,b1,b2,网络输出:y=a1*a2*x+b1+b2目标函数:y=x一、网络局部参数restore应用场景:网络架构修改,但是部分参数需要重新利用;设置方法:将var_list参数传给tf.train.Saver即可只save/restore var_list里的参数如何使用:(1)保存save:a1,a2,b1,b2分别为10,20,30,40import ten...

2018-03-11 21:41:53 1844

原创 [神经网络] 关于学习率太大导致无法收敛的问题

import tensorflow as tfimport random#训练函数y=2x-1,a/b分别要训练为2,-1x=tf.placeholder(tf.float32,[1])a=tf.Variable(tf.constant([1],dtype=tf.float32)) #b=tf.Variable(tf.constant([1],dtype=tf.float32))y=...

2018-03-11 21:11:26 18802 1

原创 [深度学习] ResNet实现细节

import tensorflow as tf"""(1)构造函数__init__参数 input_sz: 输入层placeholder的4-D shape,如mnist是[None,28,28,1] (2)train函数:训练一步 batch_input: 输入的batch batch_output: label learning_rate:学习率 返回:正...

2018-03-04 20:17:39 762

原创 [深度学习] 权值初始化 xavier和he_normal

一、概述与应用(1)论文 xavier论文:《Understanding the difficulty of training deep feedforward neural networks》 he_normal论文:《Delving Deep into Rectifiers:Surpassing Human-Level Performance on ImageNet Classif...

2018-03-04 14:06:41 24023 3

noip2010试题

要处于同一监狱内的某两个罪犯间有仇恨,那么他们一定会在每年的某个时候发生摩擦。那 么,应如何分配罪犯,才能使Z市长看到的那个冲突事件的影响力最小?这个最小值是多 换页 全国信息学奥林匹克联赛(NOIP2010)复赛 提高组

2011-01-23

空空如也

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

TA关注的人

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