title: What is the class definition of nn.Linear in PyTorch?
body: <p>What is <code>self.hidden</code> in the following code?</p>
  <pre><code>import torch.nn as nn
  import torch.nn.functional as F
  
  class Network(nn.Module):
      def __init__(self):
          super().__init__()
          self.hidden = nn.Linear(784, 256)
          self.output = nn.Linear(256, 10)
      
      def forward(self, x):
          x = F.sigmoid(self.hidden(x))
          x = F.softmax(self.output(x), dim=1)
          return x
  </code></pre>
  <p><code>self.hidden</code> is <code>nn.Linear</code> and it can take a tensor <code>x</code> as argument.</p>