Category Pytorch

113. Check Your Data..

When I was evaluating the model, both f1 score and jaccard score, for some reason, was decreasing as the model finishes more epochs. (Which is quite insane.) I’ve been checking the dimensions of the variables I was using to calculate…

94 TorchInfo

For a Tensorflow model, you can use .summary() to see the structure of your model. In pytorch, there is no such thing. So instead, you can use torchinfo. This was really useful when I wanted to do transfer-learning but didn’t…

92. DataLoader in Pytorch

When you want to load your data for training, the data preparation pipeline would be the following. Randomly shuffle your data Turn them into batches Iterate Although you can manually do this, when the data size becomes large this can…