Hi,
I wanted to creat an architecture that gradient flow is blocked from a certain layer beckward and the former layer will not update. I don’t want freeze that part. I want to put gradient of the intended layer be zero and block the gradient flow somehow the former layer will not be updated in this path. Is there any solution? I tried to put the grad of the intended output’s layer to  be zero manually in the forward path of the model but I still have the gradient values for the layers before that.

Screenshot_20191212-103709_Samsung%20Notes1079×1065 131 KB