From e4104f091a92e65c0179c2c1b6e4d4cf92ad4fe2 Mon Sep 17 00:00:00 2001 From: nl8590687 <3210346136@qq.com> Date: Wed, 11 Apr 2018 16:46:46 +0800 Subject: [PATCH] can not parallel and move it to trash --- SpeechModel.py | 2 +- readdata_serial.py => readdata.py | 9 ++------- readdata_parallel.py => trash/readdata_parallel.py | 0 3 files changed, 3 insertions(+), 8 deletions(-) rename readdata_serial.py => readdata.py (98%) rename readdata_parallel.py => trash/readdata_parallel.py (100%) diff --git a/SpeechModel.py b/SpeechModel.py index e45a26c..992f3bf 100644 --- a/SpeechModel.py +++ b/SpeechModel.py @@ -23,7 +23,7 @@ from keras.layers.advanced_activations import LeakyReLU from keras import backend as K from keras.optimizers import SGD, Adadelta -from readdata_parallel import DataSpeech +from readdata import DataSpeech from neural_network.ctc_layer import ctc_layer from neural_network.ctc_loss import ctc_batch_loss diff --git a/readdata_serial.py b/readdata.py similarity index 98% rename from readdata_serial.py rename to readdata.py index 0102e78..4942fd7 100644 --- a/readdata_serial.py +++ b/readdata.py @@ -2,8 +2,6 @@ # -*- coding: utf-8 -*- import platform as plat -import threading -from queue import Queue import numpy as np from general_function.file_wav import * @@ -69,7 +67,6 @@ class DataSpeech(): self.LoadWavData() pass - self.dataqueue = Queue() pass def LoadDataList(self): @@ -228,7 +225,7 @@ class DataSpeech(): data_input, data_labels = self.GetDataFromMem((ran_num + i) % self.DataNum) # 从随机数开始连续向后取一定数量数据 #data_input, data_labels = self.GetData(1 % self.DataNum) # 从随机数开始连续向后取一定数量数据 - #for i in range(batch_size): + #input_length.append(data_input.shape[1] // 4 - 2) #print(data_input.shape[0],len(data_input)) @@ -247,12 +244,10 @@ class DataSpeech(): label_length = np.array(label_length) input_length = np.array(input_length).T + yield [X, y, input_length, label_length ], labels pass - def thread_get_data(self, i): - - pass def GetSymbolNum(self): ''' diff --git a/readdata_parallel.py b/trash/readdata_parallel.py similarity index 100% rename from readdata_parallel.py rename to trash/readdata_parallel.py