torch forum11183×449 13.1 KB

Above is my code for trying to fix, freeze the subset(temp_5.values ) of 25th convolution layer’s filter. And the result.
I try to set the subset filter’s gradient as 0 so not to update. And the weight has been changed.
So two questions


I wonder why the gradient becomes not  zero?


Is there other solution to fix the subset convolution filter?