utils_subword_rnn.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:vsmlib 作者: undertherain 项目源码 文件源码
def __init__(self, n_vocab_char, n_units, n_units_char, index2charIds, dropout=.2):  #dropout ratio, zero indicates no dropout
        super(RNN, self).__init__()
        with self.init_scope():
            self.embed = L.EmbedID(
                n_vocab_char, n_units_char, initialW=I.Uniform(1. / n_units_char))  # word embedding
            self.mid = L.LSTM(n_units_char, n_units_char)  # the first LSTM layer
            self.out = L.Linear(n_units_char, n_units)  # the feed-forward output layer
            self.dropout = dropout
            self.index2charIds = index2charIds
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号