Shai的LSTM实现生成的.prototxt文件中的DataLayer放置 [英] DataLayer placement in the .prototxt file generated by Shai's LSTM implementation

查看:193
本文介绍了Shai的LSTM实现生成的.prototxt文件中的DataLayer放置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于@Shai在用于Caffe的LSTM模块中提供的答案,其中caffe.NetSpec()用于及时显式展开LSTM单元进行训练.

Regarding the answer provided by @Shai in LSTM module for Caffe, where caffe.NetSpec() is used to explicitly unroll LSTM units in time for training.

使用此代码实现,为什么"DummyData"层或用作输入X的任何数据层为何出现在prototxt文件中t0时间步骤的末尾,恰好在"t1/lstm/Mx"之前?我不明白...

Using this code implementation, why does the "DummyData" layer, or any data layer used instead as input X, appears at the end of the t0 time step, just before "t1/lstm/Mx" in the prototxt file? I don't get it...

因此需要一种操作(剪切/粘贴).

A manipulation (cut / paste) is hence needed.

推荐答案

Shai 的NetSpec LSTM的实现会及时展开网络.因此,对于每个时间步长,都有一个LSTM单位,每个时间步长具有相同的权重.
每个时间单位(例如t1/lstm/Mx)的底"是输入X的不同时间步长.

Shai's NetSpec implementation of LSTM unrolls the net in time. Hence for every time step there is an LSTM unit with shared weights across time steps.
The "bottom" for each unit in time (e.g. t1/lstm/Mx) is a different time step of the input X.

顺便说一句,我建议您使用draw_net.py caffe实用程序绘制生成的原型,并查看数据流和展开的LSTM单元的时间重复.

By the way, I suggest you use draw_net.py caffe utility to draw the resulting prototxt and see the flow of data and the temporal repetitions of the unrolled LSTM unit.

展开的网络如下所示: 您可以看到三个LSTM单元的组成部分,以及X不同时域切片,它们进入了每个时域展开的LSTM单元.

Here's how the unrolled net looks like: You can see the components of the three LSTM cells, and the different temporal slices of X going to each temporal unrolled LSTM unit.

这篇关于Shai的LSTM实现生成的.prototxt文件中的DataLayer放置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆