We describe DyNet, a toolkit for implementing neural network models based on dynamic declaration of network structure. In the static declaration strategy that is used in toolkits like Theano, CNTK, and TensorFlow, the user first defines a computation graph (a symbolic representation of the computation), and then examples are fed into an engine that executes this computation and computes its derivatives. In DyNet's dynamic declaration strategy, computation graph construction is mostly transparent, being implicitly constructed by executing procedural code that computes the network outputs, and the user is free to use different network structures for each input. Dynamic declaration thus facilitates the implementation of more complicated network architectures, and DyNet is specifically designed to allow users to implement their models in a way that is idiomatic in their preferred programming language (C++ or Python). One challenge with dynamic declaration is that because the symbolic computation graph is defined anew for every training example, its construction must have low overhead. To achieve this, DyNet has an optimized C++ backend and lightweight graph representation. Experiments show that DyNet's speeds are faster than or comparable with static declaration toolkits, and significantly faster than Chainer, another dynamic declaration toolkit. DyNet is released open-source under the Apache 2.0 license and available at http://github.com/clab/dynet.
翻译:我们描述DyNet, 这是一个基于网络结构动态声明的落实神经网络模型的工具包。 在Teano、CNTK和TensorFlow等工具中使用的静态宣布战略中,用户首先定义了一个计算图(计算图的象征表示),然后将示例输入一个执行此计算和计算其衍生物的引擎。在DyNet动态宣布战略中,计算图的构造大多透明,通过执行计算网络输出的程序代码来暗含构建,用户可以自由地使用不同的网络结构来进行每项输入。动态声明因此有利于实施更为复杂的网络结构,DyNet是专门设计的,允许用户以其首选的编程语言(C++或Python)的方式实施其模型。动态声明的一个挑战在于,由于对每个培训实例的符号计算图的界定是全新的,因此其构建必须具有较低的管理性。要实现这一点,DyNet有一个优化的 C++ 后端和轻量级图表演示。 实验显示,DyNet的速度比可打开的或可比较的版本版本/DISB 版本的版本版本版本工具箱/DASliveralgalgal 和另一个版本版本的版本的版本的版本的版本版本的版本的版本工具包, 。