For those who can have the same question :
I’m just doing a classical python instance norm and then I multiply by my own weights to get the adaptive behaviour
out = nn.InstanceNorm(in)
weighted_out = out * w_custom +b_custom