RNN/LSTM比CNN难理解,LSTM介绍最有名的当属colah http://colah.github.io/posts/2015-08-Understanding-LSTMs/这篇及其各种中文版。
但是。。。。。。。。。。。。。。。
https://www.zybuluo.com/hanbingtao/note/581764 这篇比colah的牛逼细致多了!!!强烈建议好好看,介绍的非常详细,输入输出的shape也解释的很清楚,x,h,c本质都是向量,那么tensorflow API BasicLSTMCell的num_hidden是什么就很清楚了
就是ht-1/ht向量的维度(c一般和h维度相同)
stackoverflow上这类问题很多,随便摘一个:
https://stackoverflow.com/questions/37901047/what-is-num-units-in-tensorflow-basiclstmcell:
If you have an input x of shape [T, 10], you will feed the LSTM with the sequence of values from t=0 to t=T-1, each of size 10.
At each timestep, you multiply the input with a matrix of shape [10, n_hidden], and get a n_hidden vector.