A_Hassan:

AttributeError: 'list' object has no attribute 'to'


There’s an issue with dataloader, ‘glioma_tumor_loader’ returns inputs as a list instead of a Tensor, and list doesn’t have method ‘to’
As for forward hook, I like this article: Debugging and Visualisation in PyTorch using Hooks, this one has example of feature extractor: How to Use PyTorch Hooks. PyTorch hooks provide a simple… | by Frank Odom | The DL | Medium 2