From 296ebf0ddf7a91ed05e1e7882f4d8e87a9219cbc Mon Sep 17 00:00:00 2001 From: nl <3210346136@qq.com> Date: Sat, 19 Jan 2019 11:32:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96data=5Fgenerator=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readdata24.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readdata24.py b/readdata24.py index f5318d7..214d97a 100644 --- a/readdata24.py +++ b/readdata24.py @@ -172,15 +172,15 @@ class DataSpeech(): 需要再修改。。。 ''' - labels = [] - for i in range(0,batch_size): - #input_length.append([1500]) - labels.append([0.0]) + #labels = [] + #for i in range(0,batch_size): + # #input_length.append([1500]) + # labels.append([0.0]) - labels = np.array(labels, dtype = np.float) - + #labels = np.array(labels, dtype = np.float) + labels = np.zeros((batch_size,1), dtype = np.float) #print(input_length,len(input_length)) while True: @@ -213,7 +213,7 @@ class DataSpeech(): label_length.append([len(data_labels)]) label_length = np.matrix(label_length) - input_length = np.array(input_length).T + input_length = np.array([input_length]).T #input_length = np.array(input_length) #print('input_length:\n',input_length) #X=X.reshape(batch_size, audio_length, 200, 1)