seq2seq

how to have a LSTM Autoencoder model over the whole vocab prediction while presenting words as embedding

社会主义新天地 提交于 2019-12-13 20:50:15
问题 So I have been working on LSTM Autoencoder model . I have also created various version of this model. 1. create the model using the already trained word embedding: in this scenario, I used the weights of already trained Glove vector, as the weight of features(text data). This is the structure: inputs = Input(shape=(SEQUENCE_LEN, EMBED_SIZE), name="input") encoded = Bidirectional(LSTM(LATENT_SIZE), merge_mode="sum", name="encoder_lstm")(inputs) encoded =Lambda(rev_entropy)(encoded) decoded =

What is currently the best way to add a custom dictionary to a neural machine translator that uses the transformer architecture?

依然范特西╮ 提交于 2019-12-11 15:56:32
问题 It's common to add a custom dictionary to a machine translator to ensure that terminology from a specific domain is correctly translated. For example, the term server should be translated differently when the document is about data centers, vs when the document is about restaurants. With a transformer model, this is not very obvious to do, since words are not aligned 1:1. I've seen a couple of papers on this topic, but I'm not sure which would be the best one to use. What are the best

大众点评信息流基于文本生成的创意优化实践

让人想犯罪 __ 提交于 2019-12-07 17:53:10
1. 引言 信息流是目前大众点评除搜索之外的第二大用户获取信息的入口,以优质内容来辅助用户消费决策并引导发现品质生活。整个大众点评信息流(下文简称点评信息流)围绕个性化推荐去连接用户和信息,把更好的内容推荐给需要的用户。信息流推荐系统涉及内容挖掘、召回、精排、重排、创意等多层机制和排序。本文主要围绕创意部分的工作展开,并选取其中重要的文本创意优化做介绍,分为三个部分:第一部分阐述几个重点问题,包括创意优化是什么,为什么做,以及挑战在哪里;第二部分讲述领域内的应用及技术进展;第三部分介绍我们创意优化的实践,最后做个总结。 什么是创意优化 创意是一个宽泛的概念,它作为一种信息载体对受众展现,可以是文本、图像、视频等任何单一或多类间的组合,如新闻的标题就是经典的创意载体。而创意优化,作为一种方法,指在原有基础上进一步挖掘和激活资源组合方式进而提升资源的价值。在互联网领域产品中,往往表现为通过优化创意载体来提升技术指标、业务目标的过程,在信息流中落地重点包括三个方向: 文本创意 :在文本方面,既包括了面向内容的摘要标题、排版改写等,也包括面向商户的推荐文案及内容化聚合页。它们都广泛地应用了文本表示和文本生成等技术,也是本文的主要方向。 图像创意 :图像方面涉及到首图或首帧的优选、图像的动态裁剪,以及图像的二次生成等。 其他创意 :包括多类展示理由(如社交关系等)、元素创意在内的额外补充信息

Seq2Seq model learns to only output EOS token (<\s>) after a few iterations

僤鯓⒐⒋嵵緔 提交于 2019-12-06 03:17:25
问题 I am creating a chatbot trained on Cornell Movie Dialogs Corpus using NMT. I am basing my code in part from https://github.com/bshao001/ChatLearner and https://github.com/chiphuyen/stanford-tensorflow-tutorials/tree/master/assignments/chatbot During training, I print a random output answer fed to the decoder from the batch and the corresponding answer that my model predicts to observe the learning progress. My issue: After only about 4 iterations of training, the model learns to output the

bert+seq2seq 周公解梦,看AI如何解析你的梦境?【转】

别说谁变了你拦得住时间么 提交于 2019-12-05 13:52:29
介绍 在参与的项目和产品中,涉及到模型和算法的需求,主要以自然语言处理(NLP)和知识图谱(KG)为主。NLP涉及面太广,而聚焦在具体场景下,想要生产落地的还需要花很多功夫。 作为NLP的主要方向,情感分析,文本多分类,实体识别等已经在项目中得到应用。例如 通过实体识别,抽取文本中提及到的公司、个人以及金融产品等。 通过情感分析,判别新闻资讯,对其提到的公司和个人是否利好? 通过文本多分类,判断资讯是否是高质量?判断资讯的行业和主题? 具体详情再找时间分享。而文本生成、序列到序列(Sequence to Sequence)在机器翻译、问答系统、聊天机器人中有较广的应用,在参与的项目中暂无涉及,本文主要通过tensorflow+bert+seq2seq实现一个简单的问答模型,旨在对seq2seq的了解和熟悉。 数据 关于seq2seq的demo数据有很多,例如小黄鸡聊天语料库,影视语料库,翻译语料库等等。由于最近总是做些奇怪的梦,便想着,做一个AI解梦的应用玩玩,just for fun。 通过采集从网上采集周公解梦数据,通过清洗,形成 dream:梦境; decode:梦境解析结果。 这样的序列对,总计33000+ 条记录。数据集下载地址:后台回复“解梦” { "dream": "梦见商人或富翁", "decode": "是个幸运的预兆,未来自己的事业很有机会成功

Seq2Seq model learns to only output EOS token (<\\s>) after a few iterations

烈酒焚心 提交于 2019-12-04 08:17:35
I am creating a chatbot trained on Cornell Movie Dialogs Corpus using NMT . I am basing my code in part from https://github.com/bshao001/ChatLearner and https://github.com/chiphuyen/stanford-tensorflow-tutorials/tree/master/assignments/chatbot During training, I print a random output answer fed to the decoder from the batch and the corresponding answer that my model predicts to observe the learning progress. My issue: After only about 4 iterations of training, the model learns to output the EOS token ( <\s> ) for every timestep. It always outputs that as its response (determined using argmax

Multilayer Seq2Seq model with LSTM in Keras

▼魔方 西西 提交于 2019-11-30 07:17:44
I was making a seq2seq model in keras. I had built single layer encoder and decoder and they were working fine. But now I want to extend it to multi layer encoder and decoder. I am building it using Keras Functional API. Training:- Code for encoder:- encoder_input=Input(shape=(None,vec_dimension)) encoder_lstm=LSTM(vec_dimension,return_state=True,return_sequences=True)(encoder_input) encoder_lstm=LSTM(vec_dimension,return_state=True)(encoder_lstm) encoder_output,encoder_h,encoder_c=encoder_lstm Code for decoder:- encoder_state=[encoder_h,encoder_c] decoder_input=Input(shape=(None,vec_dimension

Multilayer Seq2Seq model with LSTM in Keras

六眼飞鱼酱① 提交于 2019-11-29 09:14:31
问题 I was making a seq2seq model in keras. I had built single layer encoder and decoder and they were working fine. But now I want to extend it to multi layer encoder and decoder. I am building it using Keras Functional API. Training:- Code for encoder:- encoder_input=Input(shape=(None,vec_dimension)) encoder_lstm=LSTM(vec_dimension,return_state=True,return_sequences=True)(encoder_input) encoder_lstm=LSTM(vec_dimension,return_state=True)(encoder_lstm) encoder_output,encoder_h,encoder_c=encoder

bert+seq2seq 周公解梦,看AI如何解析你的梦境?【转】

六月ゝ 毕业季﹏ 提交于 2019-11-25 21:08:27
介绍 在参与的项目和产品中,涉及到模型和算法的需求,主要以自然语言处理(NLP)和知识图谱(KG)为主。NLP涉及面太广,而聚焦在具体场景下,想要生产落地的还需要花很多功夫。 作为NLP的主要方向,情感分析,文本多分类,实体识别等已经在项目中得到应用。例如 通过实体识别,抽取文本中提及到的公司、个人以及金融产品等。 通过情感分析,判别新闻资讯,对其提到的公司和个人是否利好? 通过文本多分类,判断资讯是否是高质量?判断资讯的行业和主题? 具体详情再找时间分享。而文本生成、序列到序列(Sequence to Sequence)在机器翻译、问答系统、聊天机器人中有较广的应用,在参与的项目中暂无涉及,本文主要通过tensorflow+bert+seq2seq实现一个简单的问答模型,旨在对seq2seq的了解和熟悉。 数据 关于seq2seq的demo数据有很多,例如小黄鸡聊天语料库,影视语料库,翻译语料库等等。由于最近总是做些奇怪的梦,便想着,做一个AI解梦的应用玩玩,just for fun。 通过采集从网上采集周公解梦数据,通过清洗,形成 dream:梦境; decode:梦境解析结果。 这样的序列对,总计33000+ 条记录。数据集下载地址:后台回复“解梦” { "dream": "梦见商人或富翁", "decode": "是个幸运的预兆,未来自己的事业很有机会成功