Not all LSTM layout options are specified
In the docs for the LSTM layer it states that one can specify the layout with the following options:
- T =
Sequence Length - N =
Batch Size - C =
Feature Dimensions
and the default is TNC.
The other accepted format is NTC (batch x seq x feat).
This is an issue for two reasons:
- it is not stated in the auto-generated docs. Mostly this is because of the hard-coded assert statement:
assert layout == 'TNC' or layout == 'NTC', \
"Invalid layout %s; must be one of ['TNC' or 'NTC']"%layout
which is why this is not being picked up by the auto-doc generation. However this should be there.
- because there are
3!ways for a user to order the characters 'T', 'N', and 'C':
- TNC (seq x batch x feat)
- TCN (seq x batch x feat)
- NTC (batch x seq x feat)
- NCT (batch x feat x seq)
- CNT (feat x batch x seq)
- CTN (feat x seq x batch)
While some of these formats are more likely to be used than others, I would at least expect NCT to be implemented, as it parallels 1D time series (batch, channels, values over time).
In short, I would say for maximum utility that all implementations should be implemented, however I would like to place priority on NTC.
Also maybe add a drop-down element to the docs to show assertions (so viable options are known)
proposed labels: "Feature request", "Doc"
The assertion error message gives the current possible valid layouts so not really a doc issue. If the 'NTC' layout feature or other layout is implemented then doc will be updated alongside.