Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
No masking when time series have different lengths #4238
I am talking about this example: https://github.com/deeplearning4j/dl4j-examples/blob/master/dl4j-examples/src/main/java/org/deeplearning4j/examples/recurrent/seqclassification/UCISequenceClassificationExample.java
When deleting two time steps of one .csv file in the features folder, the missing time steps are padded with zeros at the end, both in the feature and labels arrays. This is fine according to https://deeplearning4j.org/usingrnns#data Example 4, last illustration on the page, since the missing two time steps are not used anyway because masking makes them irrelevant, right?
I thought so. But the feature mask is 1s only (there should be two zeros at the end) and the labels mask, because it's a classification example, starts with 0s and ends with [1,1,1] instead of [1,0,0]. So in both masks, the padding area is filled with 1s instead of zeros for the shorter time series.
Using dl4j, datavec, nd4j 0.9.1