How Does model.eval() Affect Gradient Descent in PyTorch and How to Handle Frequent Evaluations?
My first question is: by what mechanism does model.eval() cause the gradients to fail to descend properly?
Why is the gradient wrt input zero?
This snippet tries to take gradient wrt the input to a trained model
pytorch VGG3D model is not training
I’m training a model using pytorch on 3d MR brain images.
I have defined a few functions to handle training and evaluation but it seems like the model is not training at all.
The loss changes but the accuracy remains the same. precision and recall metrics are always zero
I can’t figure out what I’m doing wrong here.
My model is based on VGG16 but customized for 3D inputs.
The task is binary classification and there is a sigmoid layer at the end of model pipeline.
How can I triainmy model when dev is not same as train
I want to train a deepfake detection model. The trian set has some attack types but the dev set has others that is not same as the attack in train set at all.
How can I trian my model when dev is not same as train
I want to train a deepfake detection model. The trian set has some attack types but the dev set has others that is not same as the attack in train set at all.
Integrating 2D Image Segmentation and 3D Point Cloud Detection in a Single Model
I hope you all doing well.
Set a part of weight tensor to requires_grad = True and keep rest of values to requires_grad = False
I am doing some kind of transfer learning, where I load a dense model and then expand the weight tensor and train only the new values after expanding it and keep the old trained values frozen. in this case I need to set the new weights to requires_grad = True
and old weights to requires_grad = False
within the same weight tensor. I tried this but it doesnt work: