I think that you confuse parameter and function in python script with PyTorch. Parameter is one of which a weight or a bias, and should be derivative. But at your first comment, “theta” is looked like a function name or something else. because of
feature = theta.matmul(features) 

Yo can do such as
self.fc = nn.Linear(RowSize, ClmSize) #2-rank FC Architecture

In your model definition. You can pass through non-linear function like;
pre_activation = self.fc(x) #x is input
post_activation = relu(pre_activation)

After this, a loss function feeds the output and can make loss value by the function, for example;
loss = criterion(post_activation, label)
loss.backward()
optimizer.step()

Best,
S.Takano