Solved by ptrblck in post #2 
              
              
                What would you like to achieve? 
You could also call train_loader.dataset.my_func(). Both ways should work though. 
Ignite provides some event handling like @trainer.on(Events.EPOCH_COMPLETED). Maybe the code would be cleaner, if you need a lot on these events.