Ⅰ 利用Python对praat构建的语音数据集如何进行训练
摘要 【python语音识别训练_用 Python 训练自己的语音识别系统,这波操作稳了_weixin_39942037的博客-CSDN博客】https://blog.csdn.net/weixin_39942037/article/details/111446620
Ⅱ python音频ZCR有什么用
稳定音频信号。python音频ZCR是指一个信号的符号变化的比率,用户可以根据比率自行调节ZCR的过零率,以此来稳定音频信号波动。
Ⅲ python需要学习什么内容
Python的学习内容还是比较多的,我们将学习的过程划分为4个阶段,每个阶段学习对应的内容,具体的学习顺序如下:
Python学习顺序:
①Python软件开发基础
掌握计算机的构成和工作原理
会使用Linux常用工具
熟练使用Docker的基本命令
建立Python开发环境,并使用print输出
使用Python完成字符串的各种操作
使用Python re模块进行程序设计
使用Python创建文件、访问、删除文件
掌握import 语句、From…import 语句、From…import* 语句、方法的引用、Python中的包
②Python软件开发进阶
能够使用Python面向对象方法开发软件
能够自己建立数据库,表,并进行基本数据库操作
掌握非关系数据库MongoDB的使用,掌握Redis开发
能够独立完成TCP/UDP服务端客户端软件开发,能够实现ftp、http服务器,开发邮件软件
能开发多进程、多线程软件
③Python全栈式WEB工程师
能够独立完成后端软件开发,深入理解Python开发后端的精髓
能够独立完成前端软件开发,并和后端结合,熟练掌握使用Python进行全站Web开发的技巧
④Python多领域开发
能够使用Python熟练编写爬虫软件
能够熟练使用Python库进行数据分析
招聘网站Python招聘职位数据爬取分析
掌握使用Python开源人工智能框架进行人工智能软件开发、语音识别、人脸识别
掌握基本设计模式、常用算法
掌握软件工程、项目管理、项目文档、软件测试调优的基本方法
互联网行业目前还是最热门的行业之一,学习IT技能之后足够优秀是有机会进入腾讯、阿里、网易等互联网大厂高薪就业的,发展前景非常好,普通人也可以学习。
想要系统学习,你可以考察对比一下开设有相关专业的热门学校,好的学校拥有根据当下企业需求自主研发课程的能力,中博软件学院、南京课工场、南京北大青鸟等开设python专业的学校都是不错的,建议实地考察对比一下。
祝你学有所成,望采纳。

Ⅳ 如何优雅的用Python玩转语音聊天机器人
所需硬件:
树莓派B+
人体红外线感应模块
内置麦克风摄像头(实测树莓派免驱淘宝链接)
申请API:
网络语音api
图灵api
语音聊天机器人实现原理:当有人来到跟前时--》触发聊天功能,开始以每2s检测录制语音--》通过网络语音api合成文字--》传递给图灵api返回回答信息--》通过网络语音合成播放
【人体感应识别部分Python代码renti.py】
#/usr/bin/python#coding:utf-8import RPi.GPIO as GPIOimport timeimport osimport signalimport atexitGPIO.setmode(GPIO.BCM) GPIO_PIR = 14 GPIO.setup(GPIO_PIR,GPIO.IN) # Echojing = 0dong = 0 sum = 0sum1 = 0oldren = 0sleep = 0def ganying(): i = 0 ok = 0 error = 0 while i < 10: if GPIO.input(GPIO_PIR) == 1 : ok = ok + 1 if GPIO.input(GPIO_PIR) == 0 : error = error + 1 time.sleep(0.01) i = i + 1 ren = ok/(error+1) return ren
1
GPIO_PIR = 14
为 红外线检测模块与树莓派的针脚,脚本函数返回0表示无人,>0 为有人
【Python语音识别聊天部分robot.py】
#/usr/bin/python# -*- coding:utf-8 -*-import sysreload(sys)sys.setdefaultencoding( "utf-8" )import urllibimport urllib2import jsonimport uuidimport base64import osimport timefrom renti import * #获取网络tokenappid=7647466apikey="网络API"secretkey="网络API" _url="h.com/oauth/2.0/token?grant_type=client_credentials&client_id=" + apikey + "&client_secret=" + secretkey; y_post=urllib2.urlopen(_url)y_read=y_post.read()y_token=json.loads(y_read)['access_token']#print y_read#print y_token #------------------function------------- def luyin(): os.system('arecord -D plughw:1,0 -c 1 -d 2 1.wav -r 8000 -f S16_LE 2>/dev/null') def fanyi():
#---------------语音识别部分 mac_address="haogeoyes" with open("1.wav",'rb') as f: s_file = f.read() speech_base64=base64.b64encode(s_file).decode('utf-8') speech_length=len(s_file) data_dict = {'format':'wav', 'rate':8000, 'channel':1, 'cuid':mac_address, 'token':y_token, 'lan':'zh', 'speech':speech_base64, 'len':speech_length} json_data = json.mps(data_dict).encode('utf-8') json_length = len(json_data) asr_server = 'm/server_api' request = urllib2.Request(url=asr_server) request.add_header("Content-Type", "application/json") request.add_header("Content-Length", json_length) fs = urllib2.urlopen(url=request, data=json_data) result_str = fs.read().decode('utf-8') json_resp = json.loads(result_str) if json_resp.has_key('result'): out_txt=json_resp['result'][0] else: out_txt="Null" return out_txt def tuling(b): f=urllib.urlopen("23.com/openapi/api?key="此处为图灵API"&info=%s" % b) f=json.loads(f.read())['text'] return f def hecheng(text,y_token): #text="你好我是机器人牛牛很高兴能够认识你" geturl="u.com/text2audio?tex="+text+"&lan=zh&per=1&pit=9&spd=6&cuid=CCyo6UGf16ggKZGwGpQYL9Gx&ctp=1&tok="+y_token return os.system('omxplayer "%s" > /dev/null 2>&1 '%(geturl)) #return os.system('omxplayer "%s" > /dev/null 2>&1 '%(geturl)) def nowtime(): return time.strftime('%Y-%m-%d %H:%M:%S ') #---------------main-----------------num=0 #num用来判断是第一次说话,还是在对话过程中first=1 #判断是不是第一说话 当1000次没有人动认为是第一次while True: if ganying()!=0: run=open('run.log','a') if first==0: hecheng("你好,我是牛牛机器人,你可以和我聊天,不过说话的时候你必须靠近话筒近一点,",y_token) hecheng("说点什么吧,2秒钟内说完哦.",y_token) first=1 #为1一段时间就不执行 num=0 #从新计数 #print ganying() run.write(nowtime()+"说点神马吧..........."+'\n') print nowtime()+"说点神马吧.........." luyin() #开始录音 out=fanyi().encode("utf-8") #翻译文字 run.write(nowtime()+"我说:"+out+'\n') print nowtime()+"我说:"+out if out == "Null": text="没有听清楚你说什么" os.system('omxplayer "shenme.wav" > /dev/null 2>&1 ') else: text=tuling(out) hecheng(text,y_token) print nowtime()+"牛牛:"+text run.write(nowtime()+"牛牛:"+text+'\n') run.close() else: #print ganying() #调试查看是否为0有人没人 #print num num=num+1 #num长时间增大说明没有人在旁边 if num > 1000: first=0 #0表示第一次说话
万事俱备 运行nohup python robot.py 哈哈就可以脱离屏幕开始愉快的语音聊天啦
下面看看聊天的日志记录吧
后续更新。。。。。。Python如何用语音优雅的控制小车
Ⅳ 如何用 Python 构建神经网络择时模型
import math
import random
random.seed(0)
def rand(a,b): #随机函数
return (b-a)*random.random()+a
def make_matrix(m,n,fill=0.0):#创建一个指定大小的矩阵
mat = []
for i in range(m):
mat.append([fill]*n)
return mat
#定义sigmoid函数和它的导数
def sigmoid(x):
return 1.0/(1.0+math.exp(-x))
def sigmoid_derivate(x):
return x*(1-x) #sigmoid函数的导数
class BPNeuralNetwork:
def __init__(self):#初始化变量
self.input_n = 0
self.hidden_n = 0
self.output_n = 0
self.input_cells = []
self.hidden_cells = []
self.output_cells = []
self.input_weights = []
self.output_weights = []
self.input_correction = []
self.output_correction = []
#三个列表维护:输入层,隐含层,输出层神经元
def setup(self,ni,nh,no):
self.input_n = ni+1 #输入层+偏置项
self.hidden_n = nh #隐含层
self.output_n = no #输出层
#初始化神经元
self.input_cells = [1.0]*self.input_n
self.hidden_cells= [1.0]*self.hidden_n
self.output_cells= [1.0]*self.output_n
#初始化连接边的边权
self.input_weights = make_matrix(self.input_n,self.hidden_n) #邻接矩阵存边权:输入层->隐藏层
self.output_weights = make_matrix(self.hidden_n,self.output_n) #邻接矩阵存边权:隐藏层->输出层
#随机初始化边权:为了反向传导做准备--->随机初始化的目的是使对称失效
for i in range(self.input_n):
for h in range(self.hidden_n):
self.input_weights[i][h] = rand(-0.2 , 0.2) #由输入层第i个元素到隐藏层第j个元素的边权为随机值
for h in range(self.hidden_n):
for o in range(self.output_n):
self.output_weights[h][o] = rand(-2.0, 2.0) #由隐藏层第i个元素到输出层第j个元素的边权为随机值
#保存校正矩阵,为了以后误差做调整
self.input_correction = make_matrix(self.input_n , self.hidden_n)
self.output_correction = make_matrix(self.hidden_n,self.output_n)
#输出预测值
def predict(self,inputs):
#对输入层进行操作转化样本
for i in range(self.input_n-1):
self.input_cells[i] = inputs[i] #n个样本从0~n-1
#计算隐藏层的输出,每个节点最终的输出值就是权值*节点值的加权和
for j in range(self.hidden_n):
total = 0.0
for i in range(self.input_n):
total+=self.input_cells[i]*self.input_weights[i][j]
# 此处为何是先i再j,以隐含层节点做大循环,输入样本为小循环,是为了每一个隐藏节点计算一个输出值,传输到下一层
self.hidden_cells[j] = sigmoid(total) #此节点的输出是前一层所有输入点和到该点之间的权值加权和
for k in range(self.output_n):
total = 0.0
for j in range(self.hidden_n):
total+=self.hidden_cells[j]*self.output_weights[j][k]
self.output_cells[k] = sigmoid(total) #获取输出层每个元素的值
return self.output_cells[:] #最后输出层的结果返回
#反向传播算法:调用预测函数,根据反向传播获取权重后前向预测,将结果与实际结果返回比较误差
def back_propagate(self,case,label,learn,correct):
#对输入样本做预测
self.predict(case) #对实例进行预测
output_deltas = [0.0]*self.output_n #初始化矩阵
for o in range(self.output_n):
error = label[o] - self.output_cells[o] #正确结果和预测结果的误差:0,1,-1
output_deltas[o]= sigmoid_derivate(self.output_cells[o])*error#误差稳定在0~1内
#隐含层误差
hidden_deltas = [0.0]*self.hidden_n
for h in range(self.hidden_n):
error = 0.0
for o in range(self.output_n):
error+=output_deltas[o]*self.output_weights[h][o]
hidden_deltas[h] = sigmoid_derivate(self.hidden_cells[h])*error
#反向传播算法求W
#更新隐藏层->输出权重
for h in range(self.hidden_n):
for o in range(self.output_n):
change = output_deltas[o]*self.hidden_cells[h]
#调整权重:上一层每个节点的权重学习*变化+矫正率
self.output_weights[h][o] += learn*change + correct*self.output_correction[h][o]
#更新输入->隐藏层的权重
for i in range(self.input_n):
for h in range(self.hidden_n):
change = hidden_deltas[h]*self.input_cells[i]
self.input_weights[i][h] += learn*change + correct*self.input_correction[i][h]
self.input_correction[i][h] = change
#获取全局误差
error = 0.0
for o in range(len(label)):
error = 0.5*(label[o]-self.output_cells[o])**2 #平方误差函数
return error
def train(self,cases,labels,limit=10000,learn=0.05,correct=0.1):
for i in range(limit): #设置迭代次数
error = 0.0
for j in range(len(cases)):#对输入层进行访问
label = labels[j]
case = cases[j]
error+=self.back_propagate(case,label,learn,correct) #样例,标签,学习率,正确阈值
def test(self): #学习异或
cases = [
[0, 0],
[0, 1],
[1, 0],
[1, 1],
] #测试样例
labels = [[0], [1], [1], [0]] #标签
self.setup(2,5,1) #初始化神经网络:输入层,隐藏层,输出层元素个数
self.train(cases,labels,10000,0.05,0.1) #可以更改
for case in cases:
print(self.predict(case))
if __name__ == '__main__':
nn = BPNeuralNetwork()
nn.test()
Ⅵ 关于python的问题
你的程序大部分都没错,只是对列表my_list中的字符串元素"5"转数值元素时,要把转换结果赋值给原元素,
否则列表my_list没改变,导致处理字符串元素"5"时,出现不支持字符串和整数相除操作的错误.
完整的Python程序如下(改动的地方见注释,仅一处有问题)
my_list = [1, 2, 3, 4, "5"]
my_list[4]=int(my_list[4]) #这里把int(my_list[4])改成my_list[4]=int(my_list[4])
number = int(input("请输入一个number:"))
for i in my_list:
print(f"{i}/{number}={i/number}")
源代码(注意源代码的缩进)

Ⅶ python代码问题。
如果在是Python解释器里运行的话,没有问题。“X,L”就是打印出X,L的值。问题应该在最后一行的X,L,如果在写成一个脚本由Python执行的话,就不能这么写了。要用"print X,L"明确告诉Python输出X,L的值。
Python(英语发音:/ˈpaɪθən/), 是一种面向对象、解释型计算机程序设计语言,由Guido van Rossum于1989年底发明,第一个公开发行版发行于1991年,Python 源代码同样遵循 GPL(GNU General Public License)协议。Python语法简洁而清晰,具有丰富和强大的类库。它常被昵称为胶水语言,能够把用其他语言制作的各种模块(尤其是C/C++)很轻松地联结在一起。常见的一种应用情形是,使用Python快速生成程序的原型(有时甚至是程序的最终界面),然后对其中有特别要求的部分,用更合适的语言改写,比如3D游戏中的图形渲染模块,性能要求特别高,就可以用C/C++重写,而后封装为Python可以调用的扩展类库。需要注意的是在您使用扩展类库时可能需要考虑平台问题,某些可能不提供跨平台的实现。
折叠在Python中学习机器学习的四个步骤:
1、首先你要使用书籍、课程、视频来学习 Python 的基础知识[2]
2、然后你必需掌握不同的模块,比如 Pandas、Numpy、Matplotlib、NLP (自然语言处理),来处理、清理、绘图和理解数据。
3、接着你必需能够从网页抓取数据,无论是通过网站API,还是网页抓取模块Beautiful Soap。通过网页抓取可以收集数据,应用于机器学习算法。
4、最后一步,你必需学习机器学习工具,比如 Scikit-Learn,或者在抓取的数据中执行机器学习算法(ML-algorithm)。
Ⅷ 如何用python调用百度语音识别
1、首先需要打开网络AI语音系统,开始编写代码,如图所示,编写好回车。

Ⅸ 怎样用python构建一个卷积神经网络模型
上周末利用python简单实现了一个卷积神经网络,只包含一个卷积层和一个maxpooling层,pooling层后面的多层神经网络采用了softmax形式的输出。实验输入仍然采用MNIST图像使用10个feature map时,卷积和pooling的结果分别如下所示。

部分源码如下:
[python]view plain
#coding=utf-8
'''''
Createdon2014年11月30日
@author:Wangliaofan
'''
importnumpy
importstruct
importmatplotlib.pyplotasplt
importmath
importrandom
import
#test
defsigmoid(inX):
if1.0+numpy.exp(-inX)==0.0:
return999999999.999999999
return1.0/(1.0+numpy.exp(-inX))
defdifsigmoid(inX):
returnsigmoid(inX)*(1.0-sigmoid(inX))
deftangenth(inX):
return(1.0*math.exp(inX)-1.0*math.exp(-inX))/(1.0*math.exp(inX)+1.0*math.exp(-inX))
defcnn_conv(in_image,filter_map,B,type_func='sigmoid'):
#in_image[num,featuremap,row,col]=>in_image[Irow,Icol]
#featuresmap[kfilter,row,col]
#type_func['sigmoid','tangenth']
#out_feature[kfilter,Irow-row+1,Icol-col+1]
shape_image=numpy.shape(in_image)#[row,col]
#print"shape_image",shape_image
shape_filter=numpy.shape(filter_map)#[kfilter,row,col]
ifshape_filter[1]>shape_image[0]orshape_filter[2]>shape_image[1]:
raiseException
shape_out=(shape_filter[0],shape_image[0]-shape_filter[1]+1,shape_image[1]-shape_filter[2]+1)
out_feature=numpy.zeros(shape_out)
k,m,n=numpy.shape(out_feature)
fork_idxinrange(0,k):
#rotate180tocalculateconv
c_filter=numpy.rot90(filter_map[k_idx,:,:],2)
forr_idxinrange(0,m):
forc_idxinrange(0,n):
#conv_temp=numpy.zeros((shape_filter[1],shape_filter[2]))
conv_temp=numpy.dot(in_image[r_idx:r_idx+shape_filter[1],c_idx:c_idx+shape_filter[2]],c_filter)
sum_temp=numpy.sum(conv_temp)
iftype_func=='sigmoid':
out_feature[k_idx,r_idx,c_idx]=sigmoid(sum_temp+B[k_idx])
eliftype_func=='tangenth':
out_feature[k_idx,r_idx,c_idx]=tangenth(sum_temp+B[k_idx])
else:
raiseException
returnout_feature
defcnn_maxpooling(out_feature,pooling_size=2,type_pooling="max"):
k,row,col=numpy.shape(out_feature)
max_index_Matirx=numpy.zeros((k,row,col))
out_row=int(numpy.floor(row/pooling_size))
out_col=int(numpy.floor(col/pooling_size))
out_pooling=numpy.zeros((k,out_row,out_col))
fork_idxinrange(0,k):
forr_idxinrange(0,out_row):
forc_idxinrange(0,out_col):
temp_matrix=out_feature[k_idx,pooling_size*r_idx:pooling_size*r_idx+pooling_size,pooling_size*c_idx:pooling_size*c_idx+pooling_size]
out_pooling[k_idx,r_idx,c_idx]=numpy.amax(temp_matrix)
max_index=numpy.argmax(temp_matrix)
#printmax_index
#printmax_index/pooling_size,max_index%pooling_size
max_index_Matirx[k_idx,pooling_size*r_idx+max_index/pooling_size,pooling_size*c_idx+max_index%pooling_size]=1
returnout_pooling,max_index_Matirx
defpoolwithfunc(in_pooling,W,B,type_func='sigmoid'):
k,row,col=numpy.shape(in_pooling)
out_pooling=numpy.zeros((k,row,col))
fork_idxinrange(0,k):
forr_idxinrange(0,row):
forc_idxinrange(0,col):
out_pooling[k_idx,r_idx,c_idx]=sigmoid(W[k_idx]*in_pooling[k_idx,r_idx,c_idx]+B[k_idx])
returnout_pooling
#out_featureistheoutputofconv
defbackErrorfromPoolToConv(theta,max_index_Matirx,out_feature,pooling_size=2):
k1,row,col=numpy.shape(out_feature)
error_conv=numpy.zeros((k1,row,col))
k2,theta_row,theta_col=numpy.shape(theta)
ifk1!=k2:
raiseException
foridx_kinrange(0,k1):
foridx_rowinrange(0,row):
foridx_colinrange(0,col):
error_conv[idx_k,idx_row,idx_col]=
max_index_Matirx[idx_k,idx_row,idx_col]*
float(theta[idx_k,idx_row/pooling_size,idx_col/pooling_size])*
difsigmoid(out_feature[idx_k,idx_row,idx_col])
returnerror_conv
defbackErrorfromConvToInput(theta,inputImage):
k1,row,col=numpy.shape(theta)
#print"theta",k1,row,col
i_row,i_col=numpy.shape(inputImage)
ifrow>i_roworcol>i_col:
raiseException
filter_row=i_row-row+1
filter_col=i_col-col+1
detaW=numpy.zeros((k1,filter_row,filter_col))
#thesamewithconvvalidinmatlab
fork_idxinrange(0,k1):
foridx_rowinrange(0,filter_row):
foridx_colinrange(0,filter_col):
subInputMatrix=inputImage[idx_row:idx_row+row,idx_col:idx_col+col]
#print"subInputMatrix",numpy.shape(subInputMatrix)
#rotatetheta180
#printnumpy.shape(theta)
theta_rotate=numpy.rot90(theta[k_idx,:,:],2)
#print"theta_rotate",theta_rotate
dotMatrix=numpy.dot(subInputMatrix,theta_rotate)
detaW[k_idx,idx_row,idx_col]=numpy.sum(dotMatrix)
detaB=numpy.zeros((k1,1))
fork_idxinrange(0,k1):
detaB[k_idx]=numpy.sum(theta[k_idx,:,:])
returndetaW,detaB
defloadMNISTimage(absFilePathandName,datanum=60000):
images=open(absFilePathandName,'rb')
buf=images.read()
index=0
magic,numImages,numRows,numColumns=struct.unpack_from('>IIII',buf,index)
printmagic,numImages,numRows,numColumns
index+=struct.calcsize('>IIII')
ifmagic!=2051:
raiseException
datasize=int(784*datanum)
datablock=">"+str(datasize)+"B"
#nextmatrix=struct.unpack_from('>47040000B',buf,index)
nextmatrix=struct.unpack_from(datablock,buf,index)
nextmatrix=numpy.array(nextmatrix)/255.0
#nextmatrix=nextmatrix.reshape(numImages,numRows,numColumns)
#nextmatrix=nextmatrix.reshape(datanum,1,numRows*numColumns)
nextmatrix=nextmatrix.reshape(datanum,1,numRows,numColumns)
returnnextmatrix,numImages
defloadMNISTlabels(absFilePathandName,datanum=60000):
labels=open(absFilePathandName,'rb')
buf=labels.read()
index=0
magic,numLabels=struct.unpack_from('>II',buf,index)
printmagic,numLabels
index+=struct.calcsize('>II')
ifmagic!=2049:
raiseException
datablock=">"+str(datanum)+"B"
#nextmatrix=struct.unpack_from('>60000B',buf,index)
nextmatrix=struct.unpack_from(datablock,buf,index)
nextmatrix=numpy.array(nextmatrix)
returnnextmatrix,numLabels
defsimpleCNN(numofFilter,filter_size,pooling_size=2,maxIter=1000,imageNum=500):
decayRate=0.01
MNISTimage,num1=loadMNISTimage("F:\train-images-idx3-ubyte",imageNum)
printnum1
row,col=numpy.shape(MNISTimage[0,0,:,:])
out_Di=numofFilter*((row-filter_size+1)/pooling_size)*((col-filter_size+1)/pooling_size)
MLP=BMNN2.MuiltilayerANN(1,[128],out_Di,10,maxIter)
MLP.setTrainDataNum(imageNum)
MLP.loadtrainlabel("F:\train-labels-idx1-ubyte")
MLP.initialweights()
#MLP.printWeightMatrix()
rng=numpy.random.RandomState(23455)
W_shp=(numofFilter,filter_size,filter_size)
W_bound=numpy.sqrt(numofFilter*filter_size*filter_size)
W_k=rng.uniform(low=-1.0/W_bound,high=1.0/W_bound,size=W_shp)
B_shp=(numofFilter,)
B=numpy.asarray(rng.uniform(low=-.5,high=.5,size=B_shp))
cIter=0
whilecIter<maxIter:
cIter+=1
ImageNum=random.randint(0,imageNum-1)
conv_out_map=cnn_conv(MNISTimage[ImageNum,0,:,:],W_k,B,"sigmoid")
out_pooling,max_index_Matrix=cnn_maxpooling(conv_out_map,2,"max")
pool_shape=numpy.shape(out_pooling)
MLP_input=out_pooling.reshape(1,1,out_Di)
#printnumpy.shape(MLP_input)
DetaW,DetaB,temperror=MLP.backwardPropogation(MLP_input,ImageNum)
ifcIter%50==0:
printcIter,"Temperror:",temperror
#printnumpy.shape(MLP.Theta[MLP.Nl-2])
#printnumpy.shape(MLP.Ztemp[0])
#printnumpy.shape(MLP.weightMatrix[0])
theta_pool=MLP.Theta[MLP.Nl-2]*MLP.weightMatrix[0].transpose()
#printnumpy.shape(theta_pool)
#print"theta_pool",theta_pool
temp=numpy.zeros((1,1,out_Di))
temp[0,:,:]=theta_pool
back_theta_pool=temp.reshape(pool_shape)
#print"back_theta_pool",numpy.shape(back_theta_pool)
#print"back_theta_pool",back_theta_pool
error_conv=backErrorfromPoolToConv(back_theta_pool,max_index_Matrix,conv_out_map,2)
#print"error_conv",numpy.shape(error_conv)
#printerror_conv
conv_DetaW,conv_DetaB=backErrorfromConvToInput(error_conv,MNISTimage[ImageNum,0,:,:])
#print"W_k",W_k
#print"conv_DetaW",conv_DetaW