- 模型构建文件
位置:OpenNMT-py\onmt\model_builder.py""" This file is for models creation, which consults options and creates each encoder and decoder accordingly. """
- Embeddings module 文档有介绍
位置:OpenNMT-py\onmt\modules\embeddings.py
里面有个feat相关参数(见下面的代码),可能可以用来加时态特征
openmnt上关于feature emb的讨论贴# Dimensions and padding for feature embedding matrices # (these have no effect if feat_vocab_sizes is empty) if feat_merge == 'sum': feat_dims = [word_vec_size] * len(feat_vocab_sizes) elif feat_vec_size > 0: feat_dims = [feat_vec_size] * len(feat_vocab_sizes) else: feat_dims = [int(vocab ** feat_vec_exponent) for vocab in feat_vocab_sizes]
添加额外特征的官方教程
网友评论