We explore different approaches to integrating a simple convolutional neural network (CNN) with the Lucene search engine in a multi-stage ranking architecture. Our models are trained using the PyTorch deep learning toolkit, which is implemented in C/C++ with a Python frontend. One obvious integration strategy is to expose the neural network directly as a service. For this, we use Apache Thrift, a software framework for building scalable cross-language services. In exploring alternative architectures, we observe that once trained, the feedforward evaluation of neural networks is quite straightforward. Therefore, we can extract the parameters of a trained CNN from PyTorch and import the model into Java, taking advantage of the Java Deeplearning4J library for feedforward evaluation. This has the advantage that the entire end-to-end system can be implemented in Java. As a third approach, we can extract the neural network from PyTorch and "compile" it into a C++ program that exposes a Thrift service. We evaluate these alternatives in terms of performance (latency and throughput) as well as ease of integration. Experiments show that feedforward evaluation of the convolutional neural network is significantly slower in Java, while the performance of the compiled C++ network does not consistently beat the PyTorch implementation.


翻译:我们探索了将简单的进化神经网络(CNN)与Lucene搜索引擎整合到多级排名结构中的不同方法。 我们的模型使用PyTorrch深学习工具包进行培训, 该工具包在C/C+++中与 Python 前端实施。 一个明显的整合战略是直接暴露神经网络作为服务。 为此, 我们使用Apache Thrift, 一个用于建设可扩缩跨语言服务的软件框架。 在探索替代结构时, 我们观察到, 一旦经过培训, 对神经网络的进化前评价就相当直截了当。 因此, 我们可以利用利用Java Deeplestelening4J 图书馆作为进化前端评价的优势, 将经过训练的CNN参数从PyTorrich中提取出来, 并将该模型输入到爪哇。 这有利于整个端到端系统在爪哇实施。 作为第三种方法, 我们可以从PyTorrch和“compile”中将神经网络抽取成一个C++方案, 暴露了神经网络的服务。 我们从业绩的角度评估这些替代品( 延和通度) 将模型输入到Prevalstut) 并将其作为快速整合网络的快速化网络的快速化过程。

0
下载
关闭预览

相关内容

Integration:Integration, the VLSI Journal。 Explanation:集成,VLSI杂志。 Publisher:Elsevier。 SIT:http://dblp.uni-trier.de/db/journals/integration/
【2020新书】C++20 特性 第二版,A Problem-Solution Approach
专知会员服务
57+阅读 · 2020年4月26日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
专知会员服务
59+阅读 · 2020年3月19日
深度强化学习策略梯度教程,53页ppt
专知会员服务
176+阅读 · 2020年2月1日
【推荐系统/计算广告/机器学习/CTR预估资料汇总】
专知会员服务
86+阅读 · 2019年10月21日
开源书:PyTorch深度学习起步
专知会员服务
49+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Github项目推荐 | AutoML与轻量模型列表
AI研习社
9+阅读 · 2019年5月4日
AutoML与轻量模型大列表
专知
8+阅读 · 2019年4月29日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
【推荐】YOLO实时目标检测(6fps)
机器学习研究会
20+阅读 · 2017年11月5日
【推荐】全卷积语义分割综述
机器学习研究会
19+阅读 · 2017年8月31日
Arxiv
5+阅读 · 2019年10月31日
Arxiv
12+阅读 · 2018年9月5日
Arxiv
3+阅读 · 2018年2月24日
VIP会员
相关VIP内容
【2020新书】C++20 特性 第二版,A Problem-Solution Approach
专知会员服务
57+阅读 · 2020年4月26日
因果图,Causal Graphs,52页ppt
专知会员服务
238+阅读 · 2020年4月19日
专知会员服务
59+阅读 · 2020年3月19日
深度强化学习策略梯度教程,53页ppt
专知会员服务
176+阅读 · 2020年2月1日
【推荐系统/计算广告/机器学习/CTR预估资料汇总】
专知会员服务
86+阅读 · 2019年10月21日
开源书:PyTorch深度学习起步
专知会员服务
49+阅读 · 2019年10月11日
2019年机器学习框架回顾
专知会员服务
35+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Github项目推荐 | AutoML与轻量模型列表
AI研习社
9+阅读 · 2019年5月4日
AutoML与轻量模型大列表
专知
8+阅读 · 2019年4月29日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
Hierarchical Imitation - Reinforcement Learning
CreateAMind
19+阅读 · 2018年5月25日
【论文】变分推断(Variational inference)的总结
机器学习研究会
39+阅读 · 2017年11月16日
【推荐】YOLO实时目标检测(6fps)
机器学习研究会
20+阅读 · 2017年11月5日
【推荐】全卷积语义分割综述
机器学习研究会
19+阅读 · 2017年8月31日
Top
微信扫码咨询专知VIP会员