Here is a simple example that produces a 2-layer transform. The first corresponds to computing length and the second the cumulative sum. The cumulative sum has to go into a second layer because it is applied to a transform which uses length, and so it can only be computed after the computation of length is complete.
but doesn't include the actual code that shows this (which the notebook does). Namely
x = cumsum(length - indices)
x.input([3, 2, 3, 5])
This is a bit confusing because in the code in the blog post would indicate that this should be a two layer transformer.
The blog post mentions
but doesn't include the actual code that shows this (which the notebook does). Namely
This is a bit confusing because in the code in the blog post would indicate that this should be a two layer transformer.