What is a “cell class” in Keras?

左心房为你撑大大i 提交于 2019-12-30 04:15:07

问题


Or, more specific: what is the difference between ConvLSTM2D and ConvLSTM2DCell?

What is the difference between SimpleRNN and SimpleRNNCell?

Same question for GRU and GRUCell

Keras manuals are not very verbose here.

I can see from RTFS (reading those fine sources) that these classes are descendants of different base classes. Those, with names, ending with Cell, are subclasses of Layer.

In my task I need to classify video sequences. That is, my classifier's input is a sequence of video frames, and the output is a single label (one-hot encoded vector).

What class should I use?


回答1:


The difference is the same for every cell layer combo:

  • Cell: The cell is the actual computation component, they take a single input, a past state and produce an output, new states. These actually perform the step function which contain the computation of a GRU cell for example.
  • RNN Layer: These layers wrap the corresponding cells to apply the same cell to multiple timesteps. So the cell is iterated over the input sequence and collect the output(s) based on extra options such as return_sequences.


来源:https://stackoverflow.com/questions/50608080/what-is-a-cell-class-in-keras

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!