Thank you for your reply. I am not clear about how it compute instance normalization. From the source code, it seems that it calls the F.batch_norm. But if the batch size is 1 like in the following case, will it be probamatic for batch_norm?
# Apply instance norm
input_reshaped = input.contiguous().view(1, b * c, *input.size()[2:])
out = F.batch_norm(
            input_reshaped, running_mean, running_var, weight, bias,
            True, self.momentum, self.eps)

Also, does it compute each individual mean for each feature map (required for instance norm) in F.batch_norm?