Closed iKintosh closed 4 years ago
Hi
Can't you use self.training
in the forward method?
Actually, I tried it in your code and it returns True
when the model is in train mode (model.train()
) and False
when the model is in eval mode (model.eval()
)
@h-sh-h Hi, can you explain to me why the following code can make weights fixed in the eval mode? What is the function of the parameter self.is_calculated? Thanks very much!
Is there any way to make GaborLayer not to calculate weights every time in evaluate or no_grads mode?
I guess I should change something in forward method, but I have no idea what to do.
https://github.com/iKintosh/GaborNet/blob/435e031790086110bb61ffb6b8f18cfb0b3d39b8/GaborLayers.py#L71-L93