Apply function in Pytorch

Hi Everyone,

I have one function, which I want to apply to all the kernels of a neural net, example kernels size: [out_ch, in_ch, H, W], I want to apply a function to all the out_ch (dim=0 of kernels) without using any for loop, how can I do this ?

Thanks in advance