You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was tying to use your data layer to write an auto text generator. But then I realized it is impossible to do so because I have to input data that is dividable by batch_size but I can only input one by one when testing the layer.
At training time, I know the whole text so I can have a batch size bigger than one. For example, for the word hello, my data are [none h e l l] and my labels are [h e l l o]
But at test time. For example, I give the net 0(for none) at the beginning of the testing, ideally, the net predicts h,then I use h as input .The input is produced by the net so I can't have a batch size bigger than one at test time. And your implenmentation doesn't allow us to change batch size.
Am I right?
The text was updated successfully, but these errors were encountered:
Lstm layer assumes that the input (0-th bottom) looks like [N x T][...] where N is batch_size, T is length, and [...] is the feature dimension.
By default, batch_size = 1, so the layer assumes that the bottom shape is [T][...].
If you want to use batch size larger than 1, you should 1) provide input in [N x T][...] shape and 2) specify "batch_size: N" into your prototxt. Otherwise, lstm layer will assume that your input is NxT-long sequence with batch size of 1.
Providing input in [NxT][...] shape is a little bit confusing.
My suggestion is to fill your input data like [N][T][...] and use "Reshape" layer to make it [NxT][...] before lstm layer.
I was tying to use your data layer to write an auto text generator. But then I realized it is impossible to do so because I have to input data that is dividable by batch_size but I can only input one by one when testing the layer.
At training time, I know the whole text so I can have a batch size bigger than one. For example, for the word hello, my data are [none h e l l] and my labels are [h e l l o]
But at test time. For example, I give the net 0(for none) at the beginning of the testing, ideally, the net predicts h,then I use h as input .The input is produced by the net so I can't have a batch size bigger than one at test time. And your implenmentation doesn't allow us to change batch size.
Am I right?
The text was updated successfully, but these errors were encountered: