Indexed Dataset


I defined a custom HookCallback to save the activations of each layer for each input of the trainingset. I was trying to get a unique index for each instance, so that I can save each index and activation in a pandas DataFrame.

In my first implementation in plain PyTorch I defined a custom Dataset, where the __getitem__() returns (x, index, y), but I can’t find a smart way to do the same with fastai, while keeping the DataBlock abstraction.

Take a look at ActivationStats