Commit c8f365b2 authored by Luca Pasa's avatar Luca Pasa
Browse files

Merge branch 'master' of gitlab.iit.it:lpasa/AV_ASR

parents b3a42cf9 965d37a2
......@@ -11,7 +11,7 @@ if __name__ == '__main__':
batch_size = 18
nIn_audio = 123
nIn_video = 134
nHidden = [123,500,600]
nHidden = [350,500]
nHidden_encode = 750
learningRate = 0.001
traininglog_dir = "./"
......@@ -19,14 +19,16 @@ if __name__ == '__main__':
test_step= 10
learningDecay = 1
momentum = 0.9
test_name="Concat_DAE_4_speech_Test_lr-"+str(learningRate)+"_batch_size-"+str(batch_size)+"_n_hidden_encode-"+str(nHidden_encode)
graph = tf.Graph()
with tf.Session(graph=graph) as sess:
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
with tf.Session(graph=graph, config=config) as sess:
model = DAE_4_speech(sess=sess,graph=graph, n_in_audio=nIn_audio, n_in_video=nIn_video, n_hidden=nHidden,
n_hidden_encode=nHidden_encode, batch_size=batch_size, learning_rate=learningRate, learning_decay=learningDecay,
momentum=momentum, updating_step=updating_step)
model.restore_model("./RESULT/BaseLine1/Concat_DAE_4_speech_Test_lr-0.001_batch_size-18_n_hidden_encode-750-500.ckpt")
model.restore_model("./RESULT/BaseLine1/Overfitting_TEST_Concat_DAE_4_speech_Test_lr-0.001_batch_size-18_n_hidden_encode-750.ckpt-500")
mse = model.get_model_output(data_set_path="/home/storage/Data/MULTI_GRID/multiModalTfRec/TRAIN_CTC_SENTENCES/")
print mse
......
......@@ -62,6 +62,7 @@ class DAE_4_speech:
get_next = it_data.get_next()
output = []
input = []
mse_list=[]
while (True):
try:
# get sample
......@@ -69,18 +70,18 @@ class DAE_4_speech:
x_v_val = Data.video_batch_align(x_a_val, x_v_val)
# compute model output
model_out,mse = self.sess.run([self.model.regression,self.loss_function],feed_dict={self.x_audio_ph: x_ma_val,
mse = self.sess.run(self.loss_function,feed_dict={self.x_audio_ph: x_ma_val,
self.x_video_ph: x_v_val,
self.x_audio_len_ph: x_len,
self.y_ph:x_a_val})
# input.append(x_a_val)
# output.append(model_out)
break
mse_list.append(mse)
except tf.errors.OutOfRangeError:
print("End of test")
break
return mse
return np.mean(np.asarray(mse))
......
......@@ -73,7 +73,7 @@ if __name__ == '__main__':
batch_size = 18
nIn_audio = 123
nIn_video = 134
nHidden = [123,500,600]
nHidden = [350,500]
nHidden_encode = 750
learningRate = 0.001
traininglog_dir = "./"
......@@ -83,7 +83,7 @@ if __name__ == '__main__':
momentum = 0.9
ckpt_file = "../Baseline_Models/RESULT/BaseLine1/Concat_DAE_4_speech_Test_lr-0.001_batch_size-18_n_hidden_encode-750-500.ckpt"
ckpt_file = "../Baseline_Models/RESULT/BaseLine1/Overfitting_TEST_Concat_DAE_4_speech_Test_lr-0.001_batch_size-18_n_hidden_encode-750.ckpt-500"
graph = tf.Graph()
with graph.as_default():
with tf.Session(graph=graph) as sess:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment