With respect to the file "HyerIQASolver.py"
In line 20 you store the parameter of the HyperNetwork to be trained in the variable "self.hypernet_params".
self.hypernet_params = filter(lambda p: id(p) not in backbone_params, self.model_hyper.parameters())
From line 77 to 84 you update the optimizer with this variable self.hypernet_params
Since self.model_hyper.parameters() returns an iterator, self.hypernet_params is an iterator and after the optimizer is initialized, it becomes empty. Therefore, after the first epoch, the optimizer doesn't optimize the HyperNetwork anymore because self.hypernet_params is empty.
Setting self.hypernet_params as a list should fix the problem: self.hypernet_params = list(filter(lambda p: id(p) not in backbone_params, self.model_hyper.parameters()))
With respect to the file "HyerIQASolver.py"
In line 20 you store the parameter of the HyperNetwork to be trained in the variable "self.hypernet_params".
self.hypernet_params = filter(lambda p: id(p) not in backbone_params, self.model_hyper.parameters())From line 77 to 84 you update the optimizer with this variable
self.hypernet_paramsSince
self.model_hyper.parameters()returns an iterator,self.hypernet_paramsis an iterator and after the optimizer is initialized, it becomes empty. Therefore, after the first epoch, the optimizer doesn't optimize the HyperNetwork anymore becauseself.hypernet_params is empty.Setting
self.hypernet_paramsas a list should fix the problem:self.hypernet_params = list(filter(lambda p: id(p) not in backbone_params, self.model_hyper.parameters()))