Home > Blockchain >  Here 'x' is the argument to what?
Here 'x' is the argument to what?

Time:10-24

class LR(nn.Module):
  def __init__(self, input_size, output_size):
    super().__init__()
    self.linear = Linear(input_size, output_size)
  def forward(self, x):
    pred = self.linear(x)
    return pred

In the above code, the 'forward' method has the parameter x. In the method, 'pred' is assigned 'self.linear(x)'. So what is this x being passed to, as self.linear does not take any arguments.

CodePudding user response:

u can refer to this official document link. notice that m is called with the random array input.

CodePudding user response:

X is the representative of the x-axis, which is the variable that tells the program to go which side. I think it is a program belonging to "the mobile animation direction program".

  • Related