Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Luca Pasa
AV_ASR
Commits
e30e274b
Commit
e30e274b
authored
Jun 15, 2018
by
Luca Pasa
Browse files
add restar training
parent
678de338
Changes
1
Hide whitespace changes
Inline
Side-by-side
Model/DAE/AV_Concat_DAE/Bi_DAE_Concat_Restart_Training.py
0 → 100644
View file @
e30e274b
import
sys
import
os
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'../../../'
))
from
Concat_DAE_4_speech
import
DAE_4_speech
import
tensorflow
as
tf
import
numpy
as
np
np
.
set_printoptions
(
threshold
=
'nan'
)
if
__name__
==
'__main__'
:
num_epochs
=
500
batch_size
=
30
nIn_audio
=
257
nIn_video
=
134
nHidden
=
[
500
,
600
]
nHidden_encode
=
750
learningRate
=
0.001
training_log_dir
=
"./test_log/"
updating_step
=
2250
test_step
=
10
learningDecay
=
1
momentum
=
0.9
test_name
=
"MULTI_GRID_100_Spectro_motion_Concat_DAE_4_speech_Test_lr-"
+
str
(
learningRate
)
+
"_batch_size-"
+
str
(
batch_size
)
+
"_n_hidden_encode-"
+
str
(
nHidden_encode
)
data_path
=
"/home/storage/Data/MULTI_GRID_100/rawAudioMotionTfRec/"
graph
=
tf
.
Graph
()
config
=
tf
.
ConfigProto
()
config
.
gpu_options
.
allow_growth
=
True
graph
=
tf
.
Graph
()
with
tf
.
Session
(
graph
=
graph
)
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
(
"./test_log/MULTI_GRID_100_Spectro_motion_Concat_DAE_4_speech_Test_lr-0.001_batch_size-30_n_hidden_encode-750.ckpt-20"
)
model
.
training_model
(
training_set_path
=
os
.
path
.
join
(
data_path
,
"TRAIN_CTC_SENTENCES"
),
test_set_path
=
os
.
path
.
join
(
data_path
,
"TEST_CTC_SENTENCES"
),
validation_set_path
=
os
.
path
.
join
(
data_path
,
"VAL_CTC_SENTENCES"
),
n_epoch
=
num_epochs
,
test_step
=
test_step
,
test_name
=
test_name
,
log_dir
=
training_log_dir
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment