@classmethod
def update_model_opts(cls, model_opt):
    if (model_opt.word_vec_size > 0):
        model_opt.src_word_vec_size = model_opt.word_vec_size
        model_opt.tgt_word_vec_size = model_opt.word_vec_size
    if (model_opt.layers > 0):
        model_opt.enc_layers = model_opt.layers
        model_opt.dec_layers = model_opt.layers
    if (model_opt.rnn_size > 0):
        model_opt.enc_rnn_size = model_opt.rnn_size
        model_opt.dec_rnn_size = model_opt.rnn_size
    model_opt.brnn = (model_opt.encoder_type == 'brnn')
    if (model_opt.copy_attn_type is None):
        model_opt.copy_attn_type = model_opt.global_attention
@classmethod
def update_model_opts(cls, model_opt):
    if (model_opt.word_vec_size > 0):
        model_opt.src_word_vec_size = model_opt.word_vec_size
        model_opt.tgt_word_vec_size = model_opt.word_vec_size
    if (model_opt.layers > 0):
        model_opt.enc_layers = model_opt.layers
        model_opt.dec_layers = model_opt.layers
    if (model_opt.rnn_size > 0):
        model_opt.enc_rnn_size = model_opt.rnn_size
        model_opt.dec_rnn_size = model_opt.rnn_size
    model_opt.brnn = (model_opt.encoder_type == 'brnn')
    if (model_opt.copy_attn_type is None):
        model_opt.copy_attn_type = model_opt.global_attention