推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
supervipcard
V2EX  ›  Python

lstm 训练 QA 问答系统的问题?

  •  
  •   supervipcard · Feb 26, 2018 · 3967 views
    This topic created in 3142 days ago, the information mentioned may be changed or developed.

    我想用 word2vex 训练词向量用于后续 lstm 模型的训练,那么训练词向量用的语料可以和训练 lstm 用的一样吗?

    6 replies  •  2018-02-26 22:26:22 +08:00
    menc
        1
    menc  
       Feb 26, 2018
    可以。
    supervipcard
        2
    supervipcard  
    OP
       Feb 26, 2018
    @menc 那请问用于训练词向量的语料在语料文件大小,每篇文章的长度等方面有什么需要注意的吗
    afpro
        3
    afpro  
       Feb 26, 2018
    直接加一个 embedding_lookup 就好了 不 word2vec 也可以
    menc
        4
    menc  
       Feb 26, 2018
    @supervipcard 越大越好。可以像楼下说的,用 embedding 层来做,数据量大的时候差别不大。
    neosfung
        5
    neosfung  
       Feb 26, 2018
    embedding_lookup 的实现原理和 word2vec 貌似不一样吧?
    supervipcard
        6
    supervipcard  
    OP
       Feb 26, 2018
    @menc @afpro 用 embedding 层的话是先将训练集的句子中单词转换成一个个 id,相当于 ont-hot 编码,并且初始化一个词向量矩阵,再输入 embedding 层的吧。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2246 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 10:14 · PVG 18:14 · LAX 03:14 · JFK 06:14
    ♥ Do have faith in what you're doing.