from libs.deep_lstm_builder import build_deep_lstm from data.wsj.fuel_utils import create_ivector_test_datastream, get_uttid_stream from libs.comp_graph_utils import ff from hmrnn.hmlstm_builder import HMRNNModel from hmrnn.mixer import reset_state from libs.hmrnn_utils import add_hmrnn_graph_params import kaldi_io if __name__ == '__main__': print(' '.join(sys.argv), file=sys.stderr) parser = get_arg_parser() add_hmrnn_graph_params(parser) parser.add_argument('model') parser.add_argument('hmrnn_model') parser.add_argument('dataset') parser.add_argument('wxfilename') args = parser.parse_args() print(args, file=sys.stderr) if args.batch_size != args.n_batch: print('--batch-size != --n-batch') sys.exit(1)
from libs.deep_lstm_utils import * import libs.deep_lstm_utils as deep_lstm_utils from libs.lasagne_libs.updates import momentum import libs.utils as utils import models.deep_bidir_lstm as models import data.wsj.fuel_utils as fuel_utils import libs.param_utils as param_utils import data.transformers as trans import itertools from fuel.transformers import Padding if __name__ == '__main__': parser = deep_lstm_utils.get_arg_parser() deep_lstm_utils.add_lhuc_params(parser) args = parser.parse_args() args.save_path = get_save_path(args) args.save_path = '{}_lhuc'.format(args.save_path) if args.use_ivectors: args.input_dim = args.input_dim + args.ivector_dim print(args) print('Load data stream {} from {}'.format(args.valid_dataset, args.data_path)) if args.norm_path: print('Use normalization data from {}'.format(args.norm_path))