jekbradbury / Minibatch.jl

Other
5 stars 1 forks source link

remove SizedBatch #1

Closed jekbradbury closed 6 years ago

jekbradbury commented 6 years ago

This PR removes SizedBatch, allowing significant code simplification. It also fixes correctness for products of two VectorBatches.

It looks like MaskedBatch is at least as fast and simple as SizedBatch for every operation other than (not yet implemented) conversion to and from CatBatch or another packed format (where we need a cumulative sum of sizes). Unlike SizedBatch, it also allows cheap _rezero, so it's better for broadcast calls with non-zero-preserving functions.