Batched transforms question

As mentioned in lesson 11, notebook 10, the plan for batched transforms is very cool! We’re looking at this for audio, too (after making sure that as many of our transforms are pure pytorch as possible). But I’m not sure when they’re getting applied. I might be missing something but it looks like the DataBlock is applying the transforms at the ItemList level, i.e. before (or while) the Dataloader batches them up. Doesn’t that mean that the transforms are being applied to each individual item as the Dataloader calls get on the itemlist? Or is there some batching going on here too? I admit that the details of the pytorch Dataloader are pretty opaque to me. If the transforms are already being applied batchwise, super cool, if not, I wonder whether there are pytorch Dataloader hooks into which we could plug the transform process, or something like that.


I haven’t thought about it carefully, but I think that the BatchTransformXCallback should work OK for this. Let me know how it goes if you try it. Probably best to start with simple image tests since it’s easy to check!