INNER CODE UNIT · Python

Model

taishi-i/nagisa · nagisa/model.py:11

class Model(object):

    def __init__(self, hp, params=None, embs=None):
        # Set hyperparameters.
        dim_uni      = hp['DIM_UNI']
        dim_bi       = hp['DIM_BI']
        dim_ctype    = hp['DIM_CTYPE']
        dim_word     = hp['DIM_WORD']
        dim_tag_emb  = hp['DIM_TAGEMB']
        size_uni     = hp['VOCAB_SIZE_UNI']
        size_bi      = hp['VOCAB_SIZE_BI']
        size_word    = hp['VOCAB_SIZE_WORD']
        size_postags = hp['VOCAB_SIZE_POSTAG']
        lr           = hp['LEARNING_RATE']
        ws           = hp['WINDOW_SIZE']
        layers       = hp['LAYERS']
        dim_hidden   = hp['DIM_HIDDEN']
        self.dropout_rate = hp['DROPOUT_RATE']

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…