Its Linear layer applies softmax automatically ?


No, a Linear layer just applies the weights and biases for the inputs.


Can i use Linear layer and after this layer add a Softmax layer ?


It is best that you don’t, because it may give you a problem when calculating the loss. You could set a condition in your model so it does the softmax operation if it is not training:
if model.training:
    return output
else:
    return torch.nn.functional.softmax(output)



Is it ok to use crossentropy loss ?


In order to train, you will need to give the raw output from nn.Linear(256, num_classes) to the Cross Entropy loss object, since the loss implementation applies LogSoftmax to calculate the loss: nn.CrossEntropyLoss