No man. In the way you do it here a random tensor is indeed initialized, but it’s not part of the learnable set of parameters for your model because of the way you initialized it. See Are torch.nn.Functional layers learnable? for clarification