in the first one, it is using the sigmoid method from lin1 and in the second one, it is using sigmoid from x. We can help you more if you put a more complete sample code.
I didn’t see any x with sigmoid. It should be a tensor. usually you define a sigmoid in your init function and call it in forward:
...
def __init__(...):
   ...
   self.sigmoid = nn.Sigmoid()

def forward(self, x):
   self.sigmoid(x)
   ...