首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

《机器学习实战:基于Scikit-Learn、Keras和TensorFlow》第16章 使用RNN和注意力机制进行自然语言处理

自然语言处理的常用方法是循环神经网络。所以接下来会从 character RNN 开始(预测句子中出现的下一个角色),继续介绍RNN,这可以让我们生成一些原生文本,在过程中,我们会学习如何在长序列上创建TensorFlow Dataset。先使用的是无状态RNN(每次迭代中学习文本中的随机部分),然后创建一个有状态RNN(保留训练迭代之间的隐藏态,可以从断点继续,用这种方法学习长规律)。然后,我们会搭建一个RNN,来做情感分析(例如,读取影评,提取评价者对电影的感情),这次是将句子当做词的序列来处理。然后会介绍用RNN如何搭建编码器-解码器架构,来做神经网络机器翻译(NMT)。我们会使用TensorFlow Addons项目中的 seq2seq API 。

02

Building deep retrieval models

In the featurization tutorial we incorporated multiple features into our models, but the models consist of only an embedding layer. We can add more dense layers to our models to increase their expressive power. In general, deeper models are capable of learning more complex patterns than shallower models. For example, our user model incorporates user ids and timestamps to model user preferences at a point in time. A shallow model (say, a single embedding layer) may only be able to learn the simplest relationships between those features and movies: a given movie is most popular around the time of its release, and a given user generally prefers horror movies to comedies. To capture more complex relationships, such as user preferences evolving over time, we may need a deeper model with multiple stacked dense layers.

00

扫码

添加站长 进交流群

领取专属 10元无门槛券

手把手带您无忧上云

扫码加入开发者社群

相关资讯

热门标签

活动推荐

    运营活动

    活动名称
    广告关闭
    领券