Hi All
I am looking for a logic to build the param groups . I know we have got method split on ,that just takes network layer indices and does rest of job. I want to build using own way to enhance knowledge.
I came across method add_param_Groups in pytorch documentation
Here is high level logic i can think of
Assume we want to build resnet model groups (m[0] m[6],m[1])
Here can be the logic
- Take children of group1 m[0] m[6]
- build dict p with key [‘params’]
such that it contains list of weight params of all the children in the layer - call add_param_group with this new dict whose params contain list of all the weight params say {params [ [] [] [] ] }
- similarly do for m[1]
if above logic is good please help writing the code…