{"action":"created","comment":{"url":"https://api.github.com/repos/baidu/Paddle/pulls/comments/81186367","pull_request_review_id":2185204,"id":81186367,"diff_hunk":"@@ -0,0 +1,298 @@\n+# 双层RNN配置与示例\r\n+\r\n+我们在`paddle/gserver/tests/test_RecurrentGradientMachine`单测中，通过多组语义相同的单双层RNN配置，讲解如何使用双层RNN。\r\n+\r\n+## 示例1：双进双出，subseq间无memory\r\n+\r\n+配置：单层RNN（`sequence_layer_group`）和双层RNN（`sequence_nest_layer_group`），语义完全相同。\r\n+\r\n+### 读取双层序列的方法\r\n+\r\n+首先，我们看一下单双层序列的不同数据组织形式（您也可以采用别的组织形式）：\r\n+\r\n+- 单层序列的数据（`Sequence/tour_train_wdseg`）如下，一共有10个样本。每个样本由两部分组成，一个label（此处都为2）和一个已经分词后的句子。\r\n+\r\n+```text\r\n+2  \t酒店 有 很 舒适 的 床垫 子 ， 床上用品 也 应该 是 一人 一 换 ， 感觉 很 利落 对 卫生 很 放心 呀 。\r\n+2  \t很 温馨 ， 也 挺 干净 的 * 地段 不错 ， 出来 就 有 全家 ， 离 地铁站 也 近 ， 交通 很方便 * 就是 都 不 给 刷牙 的 杯子 啊 ， 就 第一天 给 了 一次性杯子 *\r\n+2  \t位置 方便 ， 强烈推荐 ， 十一 出去玩 的 时候 选 的 ， 对面 就是 华润万家 ， 周围 吃饭 的 也 不少 。\r\n+2  \t交通便利 ， 吃 很 便利 ， 乾 浄 、 安静 ， 商务 房 有 电脑 、 上网 快 ， 价格 可以 ， 就 早餐 不 好吃 。 整体 是 不错 的 。 適 合 出差 來 住 。\r\n+2  \t本来 准备 住 两 晚 ， 第 2 天 一早 居然 停电 ， 且 无 通知 ， 只有 口头 道歉 。 总体来说 性价比 尚可 ， 房间 较 新 ， 还是 推荐 .\r\n+2  \t这个 酒店 去过 很多 次 了 ， 选择 的 主要原因 是 离 客户 最 便宜 相对 又 近 的 酒店\r\n+2  \t挺好 的 汉庭 ， 前台 服务 很 热情 ， 卫生 很 整洁 ， 房间 安静 ， 水温 适中 ， 挺好 ！\r\n+2  \tHowardJohnson 的 品质 ， 服务 相当 好 的 一 家 五星级 。 房间 不错 、 泳池 不错 、 楼层 安排 很 合理 。 还有 就是 地理位置 ， 简直 一 流 。 就 在 天一阁 、 月湖 旁边 ， 离 天一广场 也 不远 。 下次 来 宁波 还会 住 。\r\n+2  \t酒店 很干净 ， 很安静 ， 很 温馨 ， 服务员 服务 好 ， 各方面 都 不错 *\r\n+2  \t挺好 的 ， 就是 没 窗户 ， 不过 对 得 起 这 价格\r\n+```\r\n+\r\n+- 双层序列的数据（`Sequence/tour_train_wdseg.nest`）如下，一共有4个样本。样本间用空行分开，代表不同的双层序列，序列数据和上面的完全一样。每个样本的子句数分别为2,3,2,3。\r\n+\r\n+```text\r\n+2  \t酒店 有 很 舒适 的 床垫 子 ， 床上用品 也 应该 是 一人 一 换 ， 感觉 很 利落 对 卫生 很 放心 呀 。\r\n+2  \t很 温馨 ， 也 挺 干净 的 * 地段 不错 ， 出来 就 有 全家 ， 离 地铁站 也 近 ， 交通 很方便 * 就是 都 不 给 刷牙 的 杯子 啊 ， 就 第一天 给 了 一次性杯子 *\r\n+\r\n+2  \t位置 方便 ， 强烈推荐 ， 十一 出去玩 的 时候 选 的 ， 对面 就是 华润万家 ， 周围 吃饭 的 也 不少 。\r\n+2  \t交通便利 ， 吃 很 便利 ， 乾 浄 、 安静 ， 商务 房 有 电脑 、 上网 快 ， 价格 可以 ， 就 早餐 不 好吃 。 整体 是 不错 的 。 適 合 出差 來 住 。\r\n+2  \t本来 准备 住 两 晚 ， 第 2 天 一早 居然 停电 ， 且 无 通知 ， 只有 口头 道歉 。 总体来说 性价比 尚可 ， 房间 较 新 ， 还是 推荐 .\r\n+\r\n+2  \t这个 酒店 去过 很多 次 了 ， 选择 的 主要原因 是 离 客户 最 便宜 相对 又 近 的 酒店\r\n+2  \t挺好 的 汉庭 ， 前台 服务 很 热情 ， 卫生 很 整洁 ， 房间 安静 ， 水温 适中 ， 挺好 ！\r\n+\r\n+2  \tHowardJohnson 的 品质 ， 服务 相当 好 的 一 家 五星级 。 房间 不错 、 泳池 不错 、 楼层 安排 很 合理 。 还有 就是 地理位置 ， 简直 一 流 。 就 在 天一阁 、 月湖 旁边 ， 离 天一广场 也 不远 。 下次 来 宁波 还会 住 。\r\n+2  \t酒店 很干净 ， 很安静 ， 很 温馨 ， 服务员 服务 好 ， 各方面 都 不错 *\r\n+2  \t挺好 的 ， 就是 没 窗户 ， 不过 对 得 起 这 价格\r\n+```\r\n+\r\n+其次，我们看一下单双层序列的不同dataprovider（见`sequenceGen.py`）：\r\n+\r\n+- 单层序列的dataprovider如下：\r\n+  - word_slot是integer_value_sequence类型，代表单层序列。\r\n+  - label是integer_value类型，代表一个向量。\r\n+\r\n+```python\r\n+def hook(settings, dict_file, **kwargs):\r\n+    settings.word_dict = dict_file\r\n+    settings.input_types = [integer_value_sequence(len(settings.word_dict)), \r\n+                            integer_value(3)]\r\n+\r\n+@provider(init_hook=hook)\r\n+def process(settings, file_name):\r\n+    with open(file_name, 'r') as fdata:\r\n+        for line in fdata:\r\n+            label, comment = line.strip().split('\\t')\r\n+            label = int(''.join(label.split()))\r\n+            words = comment.split()\r\n+            word_slot = [settings.word_dict[w] for w in words if w in settings.word_dict]\r\n+            yield word_slot, label\r\n+```\r\n+\r\n+- 双层序列的dataprovider如下：\r\n+  - word_slot是integer_value_sub_sequence类型，代表双层序列。\r\n+  - label是integer_value_sequence类型，代表单层序列，即一个子句一个label。注意：也可以为integer_value类型，代表一个向量，即一个句子一个label。通常根据任务需求进行不同设置。\r\n+  - 关于dataprovider中input_types的详细用法，参见PyDataProvider2。\r\n+\r\n+```python\r\n+def hook2(settings, dict_file, **kwargs):\r\n+    settings.word_dict = dict_file\r\n+    settings.input_types = [integer_value_sub_sequence(len(settings.word_dict)),\r\n+                            integer_value_sequence(3)]\r\n+\r\n+@provider(init_hook=hook2)\r\n+def process2(settings, file_name):\r\n+    with open(file_name) as fdata:\r\n+        label_list = []\r\n+        word_slot_list = []\r\n+        for line in fdata:\r\n+            if (len(line)) > 1:\r\n+                label,comment = line.strip().split('\\t')\r\n+                label = int(''.join(label.split()))\r\n+                words = comment.split()\r\n+                word_slot = [settings.word_dict[w] for w in words if w in settings.word_dict]\r\n+                label_list.append(label)\r\n+                word_slot_list.append(word_slot)\r\n+            else:\r\n+                yield word_slot_list, label_list\r\n+                label_list = []\r\n+                word_slot_list = []\r\n+```\r\n+\r\n+### 模型中的配置\r\n+\r\n+首先，我们看一下单层序列的配置（见`sequence_layer_group.conf`）。注意：batchsize=5表示一次过5句单层序列，因此2个batch就可以完成1个pass。\r\n+\r\n+```python\r\n+settings(batch_size=5)\r\n+\r\n+data = data_layer(name=\"word\", size=dict_dim)\r\n+\r\n+emb = embedding_layer(input=data, size=word_dim)\r\n+\r\n+# (lstm_input + lstm) is equal to lstmemory \r\n+with mixed_layer(size=hidden_dim*4) as lstm_input:\r\n+    lstm_input += full_matrix_projection(input=emb)\r\n+\r\n+lstm = lstmemory_group(input=lstm_input,\r\n+                       size=hidden_dim,\r\n+                       act=TanhActivation(),\r\n+                       gate_act=SigmoidActivation(),\r\n+                       state_act=TanhActivation(),\r\n+                       lstm_layer_attr=ExtraLayerAttribute(error_clipping_threshold=50))\r\n+\r\n+lstm_last = last_seq(input=lstm)\r\n+\r\n+with mixed_layer(size=label_dim, \r\n+                 act=SoftmaxActivation(), \r\n+                 bias_attr=True) as output:\r\n+    output += full_matrix_projection(input=lstm_last)\r\n+\r\n+outputs(classification_cost(input=output, label=data_layer(name=\"label\", size=1)))\r\n+\r\n+```\r\n+其次，我们看一下语义相同的双层序列配置（见`sequence_nest_layer_group.conf`），并对其详细分析：\r\n+\r\n+- batchsize=2表示一次过2句双层序列。但从上面的数据格式可知，2句双层序列和5句单层序列的数据完全一样。\r\n+- data_layer和embedding_layer不关心数据是否是序列格式，因此两个配置在这两层上的输出是一样的。\r\n+- lstmemory:\r\n+  - 单层序列过了一个mixed_layer和lstmemory_group。\r\n+  - 双层序列在同样的mixed_layer和lstmemory_group外，直接加了一层group。由于这个外层group里面没有memory，表示subseq间不存在联系，即起到的作用仅仅是把双层seq拆成单层，因此双层序列过完lstmemory的输出和单层的一样。\r\n+- last_seq：\r\n+  - 单层序列直接取了最后一个元素\r\n+  - 双层序列首先（last_seq层）取了每个subseq的最后一个元素，将其拼接成一个新的单层序列；接着（expand_layer层）将其扩展成一个新的双层序列，其中第i个subseq中的所有向量均为输入的单层序列中的第i个向量；最后（average_layer层）取了每个subseq的平均值。\r\n+  - 分析得出：第一个last_seq后，每个subseq的最后一个元素就等于单层序列的最后一个元素，而expand_layer和average_layer后，依然保持每个subseq最后一个元素的值不变（这两层仅是为了展示它们的用法，实际中并不需要）。因此单双层序列的输出是一样旳。\r\n+\r\n+```python\r\n+settings(batch_size=2)\r\n+\r\n+data = data_layer(name=\"word\", size=dict_dim)\r\n+\r\n+emb_group = embedding_layer(input=data, size=word_dim)\r\n+\r\n+# (lstm_input + lstm) is equal to lstmemory \r\n+def lstm_group(lstm_group_input):\r\n+    with mixed_layer(size=hidden_dim*4) as group_input:\r\n+      group_input += full_matrix_projection(input=lstm_group_input)\r\n+\r\n+    lstm_output = lstmemory_group(input=group_input,\r\n+                                  name=\"lstm_group\",\r\n+                                  size=hidden_dim,\r\n+                                  act=TanhActivation(),\r\n+                                  gate_act=SigmoidActivation(),\r\n+                                  state_act=TanhActivation(),\r\n+                                  lstm_layer_attr=ExtraLayerAttribute(error_clipping_threshold=50))\r\n+    return lstm_output\r\n+\r\n+lstm_nest_group = recurrent_group(input=SubsequenceInput(emb_group),\r\n+                                  step=lstm_group,\r\n+                                  name=\"lstm_nest_group\")\r\n+# hasSubseq ->(seqlastins) seq\r\n+lstm_last = last_seq(input=lstm_nest_group, agg_level=AggregateLevel.EACH_SEQUENCE)\r\n+\r\n+# seq ->(expand) hasSubseq\r\n+lstm_expand = expand_layer(input=lstm_last, expand_as=emb_group, expand_level=ExpandLevel.FROM_SEQUENCE)\r\n+\r\n+# hasSubseq ->(average) seq\r\n+lstm_average = pooling_layer(input=lstm_expand,\r\n+                             pooling_type=AvgPooling(),\r\n+                             agg_level=AggregateLevel.EACH_SEQUENCE)\r\n+\r\n+with mixed_layer(size=label_dim, \r\n+                 act=SoftmaxActivation(), \r\n+                 bias_attr=True) as output:\r\n+    output += full_matrix_projection(input=lstm_average)\r\n+\r\n+outputs(classification_cost(input=output, label=data_layer(name=\"label\", size=1)))\r\n+```\r\n+## 示例2：双进双出，subseq间有memory\r\n+\r\n+配置：单层RNN（`sequence_rnn.conf`），双层RNN（`sequence_nest_rnn.conf`和`sequence_nest_rnn_readonly_memory.conf`），语义完全相同。\r\n+\r\n+### 读取双层序列的方法\r\n+\r\n+我们看一下单双层序列的不同数据组织形式和dataprovider（见`rnn_data_provider.py`）\r\n+```python\r\n+data = [\r\n+    [[[1, 3, 2], [4, 5, 2]], 0],\r\n+    [[[0, 2], [2, 5], [0, 1, 2]], 1],\r\n+]\r\n+\r\n+@provider(input_types=[integer_value_sub_sequence(10),\r\n+                       integer_value(2)])\r\n+def process_subseq(settings, file_name):\r\n+    for d in data:\r\n+        yield d\r\n+\r\n+@provider(input_types=[integer_value_sequence(10),\r\n+                       integer_value(2)])\r\n+def process_seq(settings, file_name):\r\n+    for d in data:\r\n+        seq = []\r\n+```\r\n+- 单层序列：有两句，分别为[1,3,2,4,5,2]和[0,2,2,5,0,1,2]。\r\n+- 双层序列：有两句，分别为[[1,3,2],[4,5,2]]（2个子句）和[[0,2],[2,5],[0,1,2]]（3个子句）。\r\n+- 单双层序列的label都分别是0和1\r\n+\r\n+### 模型中的配置\r\n+\r\n+我们选取单双层序列配置中的不同部分，来对比分析两者语义相同的原因。\r\n+\r\n+- 单层序列：过了一个很简单的recurrent_group。每一个时间步，当前的输入y和上一个时间步的输出rnn_state做了一个全链接。\r\n+\r\n+```python\r\n+def step(y):\r\n+    mem = memory(name=\"rnn_state\", size=hidden_dim)\r\n+    return fc_layer(input=[y, mem],\r\n+                    size=hidden_dim,\r\n+                    act=TanhActivation(),\r\n+                    bias_attr=True,\r\n+                    name=\"rnn_state\")\r\n+\r\n+out = recurrent_group(step=step, input=emb)\r\n+```\r\n+- 双层序列，外层memory是一个元素：\r\n+  - 内层inner_step的recurrent_group和单层序列的几乎一样。除了boot_layer=outer_mem，表示将外层的outer_mem作为内层memory的初始状态。外层outer_step中，outer_mem是一个子句的最后一个向量，即整个双层group是将前一个子句的最后一个向量，作为下一个子句memory的初始状态。\r\n+  - 从输入数据上看，单双层序列的句子是一样的，只是双层序列将其又做了子序列划分。因此双层序列的配置中，必须将前一个子句的最后一个元素，作为boot_layer传给下一个子句的memory，才能保证和单层序列的配置中“每一个时间步都用了上一个时间步的输出结果”一致。\r\n+\r\n+```python\r\n+def outer_step(x):\r\n+    outer_mem = memory(name=\"outer_rnn_state\", size=hidden_dim)\r\n+    def inner_step(y):\r\n+        inner_mem = memory(name=\"inner_rnn_state\",\r\n+                           size=hidden_dim,\r\n+                           boot_layer=outer_mem)\r\n+        return fc_layer(input=[y, inner_mem],\r\n+                        size=hidden_dim,\r\n+                        act=TanhActivation(),\r\n+                        bias_attr=True,\r\n+                        name=\"inner_rnn_state\")\r\n+\r\n+    inner_rnn_output = recurrent_group(\r\n+        step=inner_step,\r\n+        input=x)\r\n+    last = last_seq(input=inner_rnn_output, name=\"outer_rnn_state\")\r\n+\r\n+    return inner_rnn_output\r\n+\r\n+out = recurrent_group(step=outer_step, input=SubsequenceInput(emb))\r\n+```\r\n+- 双层序列，外层memory是单层序列：\r\n+  - 由于外层每个时间步返回的是一个子句，这些子句的长度往往不等长。因此当外层有is_seq=True的memory时，内层是**无法直接使用**它的，即内层memory的boot_layer不能链接外层的这个memory。\r\n+  - 如果内层memory想**间接使用**这个外层memory，只能通过`pooling_layer`、`last_seq`或`first_seq`这三个layer将它先变成一个元素。但这种情况下，外层memory必须有boot_layer，否则在第0个时间步时，由于外层memory没有任何seq信息，因此上述三个layer的前向会报出“**Check failed: input.sequenceStartPositions**”的错误。\r\n+  - `sequence_nest_rnn_readonly_memory.conf`中的`readonly_mem`是一个单层序列，目前是作为只读memory，即对output没有任何贡献。\r\n+\r\n+```python\r\n+def outer_step(x):\r\n+    # if memory in hierachical rnn is sequence (is_seq=True), it must be read-only \r\n+    # memory, since the sequence length of each timestep maybe different.\r\n+    readonly_mem = memory(name=\"outer_rnn_readonly\", size=hidden_dim, is_seq=True)\r","path":"doc_cn/algorithm/rnn/hierarchical-rnn.md","position":266,"original_position":266,"commit_id":"ebf144c5ca515af2d901049e97db48b198a44a26","original_commit_id":"ebf144c5ca515af2d901049e97db48b198a44a26","user":{"login":"emailweixu","id":9756952,"avatar_url":"https://avatars.githubusercontent.com/u/9756952?v=3","gravatar_id":"","url":"https://api.github.com/users/emailweixu","html_url":"https://github.com/emailweixu","followers_url":"https://api.github.com/users/emailweixu/followers","following_url":"https://api.github.com/users/emailweixu/following{/other_user}","gists_url":"https://api.github.com/users/emailweixu/gists{/gist_id}","starred_url":"https://api.github.com/users/emailweixu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emailweixu/subscriptions","organizations_url":"https://api.github.com/users/emailweixu/orgs","repos_url":"https://api.github.com/users/emailweixu/repos","events_url":"https://api.github.com/users/emailweixu/events{/privacy}","received_events_url":"https://api.github.com/users/emailweixu/received_events","type":"User","site_admin":false},"body":"最好是一个sequence memory真正有用的例子，否则用户很难理解这有什么用。另外这样的不变的memory应该通过StaticInput来实现。","created_at":"2016-09-29T17:10:41Z","updated_at":"2016-09-29T17:39:06Z","html_url":"https://github.com/baidu/Paddle/pull/106#discussion_r81186367","pull_request_url":"https://api.github.com/repos/baidu/Paddle/pulls/106","_links":{"self":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/comments/81186367"},"html":{"href":"https://github.com/baidu/Paddle/pull/106#discussion_r81186367"},"pull_request":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/106"}}},"pull_request":{"url":"https://api.github.com/repos/baidu/Paddle/pulls/106","id":86459867,"html_url":"https://github.com/baidu/Paddle/pull/106","diff_url":"https://github.com/baidu/Paddle/pull/106.diff","patch_url":"https://github.com/baidu/Paddle/pull/106.patch","issue_url":"https://api.github.com/repos/baidu/Paddle/issues/106","number":106,"state":"open","locked":false,"title":"hierarchical rnn document, add new config example","user":{"login":"luotao1","id":6836917,"avatar_url":"https://avatars.githubusercontent.com/u/6836917?v=3","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-23T06:25:59Z","updated_at":"2016-09-29T17:39:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84858a1421f973efe416dfc9c20edf54a258b72b","assignee":{"login":"reyoung","id":728699,"avatar_url":"https://avatars.githubusercontent.com/u/728699?v=3","gravatar_id":"","url":"https://api.github.com/users/reyoung","html_url":"https://github.com/reyoung","followers_url":"https://api.github.com/users/reyoung/followers","following_url":"https://api.github.com/users/reyoung/following{/other_user}","gists_url":"https://api.github.com/users/reyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/reyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyoung/subscriptions","organizations_url":"https://api.github.com/users/reyoung/orgs","repos_url":"https://api.github.com/users/reyoung/repos","events_url":"https://api.github.com/users/reyoung/events{/privacy}","received_events_url":"https://api.github.com/users/reyoung/received_events","type":"User","site_admin":false},"assignees":[{"login":"reyoung","id":728699,"avatar_url":"https://avatars.githubusercontent.com/u/728699?v=3","gravatar_id":"","url":"https://api.github.com/users/reyoung","html_url":"https://github.com/reyoung","followers_url":"https://api.github.com/users/reyoung/followers","following_url":"https://api.github.com/users/reyoung/following{/other_user}","gists_url":"https://api.github.com/users/reyoung/gists{/gist_id}","starred_url":"https://api.github.com/users/reyoung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reyoung/subscriptions","organizations_url":"https://api.github.com/users/reyoung/orgs","repos_url":"https://api.github.com/users/reyoung/repos","events_url":"https://api.github.com/users/reyoung/events{/privacy}","received_events_url":"https://api.github.com/users/reyoung/received_events","type":"User","site_admin":false},{"login":"Zrachel","id":4532062,"avatar_url":"https://avatars.githubusercontent.com/u/4532062?v=3","gravatar_id":"","url":"https://api.github.com/users/Zrachel","html_url":"https://github.com/Zrachel","followers_url":"https://api.github.com/users/Zrachel/followers","following_url":"https://api.github.com/users/Zrachel/following{/other_user}","gists_url":"https://api.github.com/users/Zrachel/gists{/gist_id}","starred_url":"https://api.github.com/users/Zrachel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zrachel/subscriptions","organizations_url":"https://api.github.com/users/Zrachel/orgs","repos_url":"https://api.github.com/users/Zrachel/repos","events_url":"https://api.github.com/users/Zrachel/events{/privacy}","received_events_url":"https://api.github.com/users/Zrachel/received_events","type":"User","site_admin":false},{"login":"lcy-seso","id":5842774,"avatar_url":"https://avatars.githubusercontent.com/u/5842774?v=3","gravatar_id":"","url":"https://api.github.com/users/lcy-seso","html_url":"https://github.com/lcy-seso","followers_url":"https://api.github.com/users/lcy-seso/followers","following_url":"https://api.github.com/users/lcy-seso/following{/other_user}","gists_url":"https://api.github.com/users/lcy-seso/gists{/gist_id}","starred_url":"https://api.github.com/users/lcy-seso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lcy-seso/subscriptions","organizations_url":"https://api.github.com/users/lcy-seso/orgs","repos_url":"https://api.github.com/users/lcy-seso/repos","events_url":"https://api.github.com/users/lcy-seso/events{/privacy}","received_events_url":"https://api.github.com/users/lcy-seso/received_events","type":"User","site_admin":false},{"login":"qingqing01","id":7845005,"avatar_url":"https://avatars.githubusercontent.com/u/7845005?v=3","gravatar_id":"","url":"https://api.github.com/users/qingqing01","html_url":"https://github.com/qingqing01","followers_url":"https://api.github.com/users/qingqing01/followers","following_url":"https://api.github.com/users/qingqing01/following{/other_user}","gists_url":"https://api.github.com/users/qingqing01/gists{/gist_id}","starred_url":"https://api.github.com/users/qingqing01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qingqing01/subscriptions","organizations_url":"https://api.github.com/users/qingqing01/orgs","repos_url":"https://api.github.com/users/qingqing01/repos","events_url":"https://api.github.com/users/qingqing01/events{/privacy}","received_events_url":"https://api.github.com/users/qingqing01/received_events","type":"User","site_admin":false},{"login":"emailweixu","id":9756952,"avatar_url":"https://avatars.githubusercontent.com/u/9756952?v=3","gravatar_id":"","url":"https://api.github.com/users/emailweixu","html_url":"https://github.com/emailweixu","followers_url":"https://api.github.com/users/emailweixu/followers","following_url":"https://api.github.com/users/emailweixu/following{/other_user}","gists_url":"https://api.github.com/users/emailweixu/gists{/gist_id}","starred_url":"https://api.github.com/users/emailweixu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emailweixu/subscriptions","organizations_url":"https://api.github.com/users/emailweixu/orgs","repos_url":"https://api.github.com/users/emailweixu/repos","events_url":"https://api.github.com/users/emailweixu/events{/privacy}","received_events_url":"https://api.github.com/users/emailweixu/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/baidu/Paddle/pulls/106/commits","review_comments_url":"https://api.github.com/repos/baidu/Paddle/pulls/106/comments","review_comment_url":"https://api.github.com/repos/baidu/Paddle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baidu/Paddle/issues/106/comments","statuses_url":"https://api.github.com/repos/baidu/Paddle/statuses/ebf144c5ca515af2d901049e97db48b198a44a26","head":{"label":"luotao1:rnn","ref":"rnn","sha":"ebf144c5ca515af2d901049e97db48b198a44a26","user":{"login":"luotao1","id":6836917,"avatar_url":"https://avatars.githubusercontent.com/u/6836917?v=3","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},"repo":{"id":68666112,"name":"Paddle","full_name":"luotao1/Paddle","owner":{"login":"luotao1","id":6836917,"avatar_url":"https://avatars.githubusercontent.com/u/6836917?v=3","gravatar_id":"","url":"https://api.github.com/users/luotao1","html_url":"https://github.com/luotao1","followers_url":"https://api.github.com/users/luotao1/followers","following_url":"https://api.github.com/users/luotao1/following{/other_user}","gists_url":"https://api.github.com/users/luotao1/gists{/gist_id}","starred_url":"https://api.github.com/users/luotao1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luotao1/subscriptions","organizations_url":"https://api.github.com/users/luotao1/orgs","repos_url":"https://api.github.com/users/luotao1/repos","events_url":"https://api.github.com/users/luotao1/events{/privacy}","received_events_url":"https://api.github.com/users/luotao1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luotao1/Paddle","description":"PArallel Distributed Deep LEarning","fork":true,"url":"https://api.github.com/repos/luotao1/Paddle","forks_url":"https://api.github.com/repos/luotao1/Paddle/forks","keys_url":"https://api.github.com/repos/luotao1/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luotao1/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luotao1/Paddle/teams","hooks_url":"https://api.github.com/repos/luotao1/Paddle/hooks","issue_events_url":"https://api.github.com/repos/luotao1/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/luotao1/Paddle/events","assignees_url":"https://api.github.com/repos/luotao1/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/luotao1/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/luotao1/Paddle/tags","blobs_url":"https://api.github.com/repos/luotao1/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luotao1/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luotao1/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/luotao1/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luotao1/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/luotao1/Paddle/languages","stargazers_url":"https://api.github.com/repos/luotao1/Paddle/stargazers","contributors_url":"https://api.github.com/repos/luotao1/Paddle/contributors","subscribers_url":"https://api.github.com/repos/luotao1/Paddle/subscribers","subscription_url":"https://api.github.com/repos/luotao1/Paddle/subscription","commits_url":"https://api.github.com/repos/luotao1/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/luotao1/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/luotao1/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/luotao1/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/luotao1/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/luotao1/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luotao1/Paddle/merges","archive_url":"https://api.github.com/repos/luotao1/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luotao1/Paddle/downloads","issues_url":"https://api.github.com/repos/luotao1/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/luotao1/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/luotao1/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/luotao1/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luotao1/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/luotao1/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/luotao1/Paddle/deployments","created_at":"2016-09-20T02:32:06Z","updated_at":"2016-09-20T02:32:10Z","pushed_at":"2016-09-29T07:20:58Z","git_url":"git://github.com/luotao1/Paddle.git","ssh_url":"git@github.com:luotao1/Paddle.git","clone_url":"https://github.com/luotao1/Paddle.git","svn_url":"https://github.com/luotao1/Paddle","homepage":"http://www.paddlepaddle.org/","size":9352,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"baidu:master","ref":"master","sha":"1fc4352754b37f298353b0d0d4b0ddd28b937b01","user":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"repo":{"id":65711522,"name":"Paddle","full_name":"baidu/Paddle","owner":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baidu/Paddle","description":"PArallel Distributed Deep LEarning","fork":false,"url":"https://api.github.com/repos/baidu/Paddle","forks_url":"https://api.github.com/repos/baidu/Paddle/forks","keys_url":"https://api.github.com/repos/baidu/Paddle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baidu/Paddle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baidu/Paddle/teams","hooks_url":"https://api.github.com/repos/baidu/Paddle/hooks","issue_events_url":"https://api.github.com/repos/baidu/Paddle/issues/events{/number}","events_url":"https://api.github.com/repos/baidu/Paddle/events","assignees_url":"https://api.github.com/repos/baidu/Paddle/assignees{/user}","branches_url":"https://api.github.com/repos/baidu/Paddle/branches{/branch}","tags_url":"https://api.github.com/repos/baidu/Paddle/tags","blobs_url":"https://api.github.com/repos/baidu/Paddle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baidu/Paddle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baidu/Paddle/git/refs{/sha}","trees_url":"https://api.github.com/repos/baidu/Paddle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baidu/Paddle/statuses/{sha}","languages_url":"https://api.github.com/repos/baidu/Paddle/languages","stargazers_url":"https://api.github.com/repos/baidu/Paddle/stargazers","contributors_url":"https://api.github.com/repos/baidu/Paddle/contributors","subscribers_url":"https://api.github.com/repos/baidu/Paddle/subscribers","subscription_url":"https://api.github.com/repos/baidu/Paddle/subscription","commits_url":"https://api.github.com/repos/baidu/Paddle/commits{/sha}","git_commits_url":"https://api.github.com/repos/baidu/Paddle/git/commits{/sha}","comments_url":"https://api.github.com/repos/baidu/Paddle/comments{/number}","issue_comment_url":"https://api.github.com/repos/baidu/Paddle/issues/comments{/number}","contents_url":"https://api.github.com/repos/baidu/Paddle/contents/{+path}","compare_url":"https://api.github.com/repos/baidu/Paddle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baidu/Paddle/merges","archive_url":"https://api.github.com/repos/baidu/Paddle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baidu/Paddle/downloads","issues_url":"https://api.github.com/repos/baidu/Paddle/issues{/number}","pulls_url":"https://api.github.com/repos/baidu/Paddle/pulls{/number}","milestones_url":"https://api.github.com/repos/baidu/Paddle/milestones{/number}","notifications_url":"https://api.github.com/repos/baidu/Paddle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baidu/Paddle/labels{/name}","releases_url":"https://api.github.com/repos/baidu/Paddle/releases{/id}","deployments_url":"https://api.github.com/repos/baidu/Paddle/deployments","created_at":"2016-08-15T06:59:08Z","updated_at":"2016-09-29T15:07:10Z","pushed_at":"2016-09-29T15:46:04Z","git_url":"git://github.com/baidu/Paddle.git","ssh_url":"git@github.com:baidu/Paddle.git","clone_url":"https://github.com/baidu/Paddle.git","svn_url":"https://github.com/baidu/Paddle","homepage":"http://www.paddlepaddle.org/","size":10873,"stargazers_count":3445,"watchers_count":3445,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":758,"mirror_url":null,"open_issues_count":30,"forks":758,"open_issues":30,"watchers":3445,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/106"},"html":{"href":"https://github.com/baidu/Paddle/pull/106"},"issue":{"href":"https://api.github.com/repos/baidu/Paddle/issues/106"},"comments":{"href":"https://api.github.com/repos/baidu/Paddle/issues/106/comments"},"review_comments":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/106/comments"},"review_comment":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baidu/Paddle/pulls/106/commits"},"statuses":{"href":"https://api.github.com/repos/baidu/Paddle/statuses/ebf144c5ca515af2d901049e97db48b198a44a26"}}}}
{"actor":{"display_login":"emailweixu"}}