Freeze the weights / kernel

I can see many tutorial about freezing layers or freezing all weights in a layer but I would like to freeze only a subset of weights. For example, if the kernel size is 7x7 I would like to train only 5x5 starting from top left and freezing right bottom 2x2. I would like to declare it as 7x7 rather than 5x5. Is it possible to freeze these 2x2 ?

See this post:

Essentially you just don’t those specefic parameters grad.