This is what I meant by object composition: https://github.com/recastrodiaz/torchsample/commit/879fae8b22ebe4d6bd75697c0a879edbd76a3bb9 40
PS: I’ve also replaced the imports DataLoader and TensorDataset to the Pytorch’s implementation (I manually create DataLoaders that pin_memory = true). Not sure this affects something else in your repo though. And I’m not sure either, what the differences are between Pytorch’s DataLoader and yours.
Edit2: I’ve implemented Accuracy logging here 9 I haven’t entirely finished testing it but I’d love to know if this is what you had in mind?
Happy to use a different approach that doesn’t break backwards compatibility.