有状态RNN中的时间反向传播 [英] Backpropagation through time in stateful RNNs

查看:54
本文介绍了有状态RNN中的时间反向传播的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Keras中使用有状态RNN来处理长度为N的序列,该序列分为N个部分(每个时间步都是单独处理的),

If I use a stateful RNN in Keras for processing a sequence of length N divided into N parts (each time step is processed individually),

  1. 反向传播如何处理?它只会影响最后一个时间步长,还是会在整个序列中反向传播?
  2. 如果它没有在整个序列中传播,是否有办法做到?

推荐答案

反向传播范围仅限于输入序列的第二维.即,如果您的数据类型为(num_sequences,num_time_steps_per_seq,data_dim),则在值 num_time_steps_per_seq 的时间范围内完成反向支持.看看

The back propagation horizon is limited to the second dimension of the input sequence. i.e. if your data is of type (num_sequences, num_time_steps_per_seq, data_dim) then back prop is done over a time horizon of value num_time_steps_per_seq Take a look at

https://github.com/fchollet/keras/issues/3669

这篇关于有状态RNN中的时间反向传播的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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