I would like to monitor the change of weights in every epoch.
So i use torch.save.
torch.save({‘epoch’: epoch,
‘net_state_dict’: net.state_dict(),
‘optimizer_state_dict’: optimizer.state_dict()},
‘save_weights/weights.pt’)
Then, i train ResNet-34 for CIFAR-10 image classification.
If the above function is used, a large amount of tensors are recorded, making it difficult to measure.
So, I want to monitor the weight of a specific layer or measure the mean of a specific tensor.
Any advice would be appreciated!