Thank you for your reply.
I changed the model 's define by following your advice.
And I checked the contain of model(Input_data).
The shape of it is [1,6400].
I felt it was defined correctly and the code was working as it was.
The pred is [1,6400], while there are only 6 labels.
Will it calculate the index of the maximum value of this?
Or is the model’s define so wrong because I ues the bindsnet.
cord
class LogisticRegression(nn.Module):
    def __init__(self, input_size, num_classes):
        super(LogisticRegression, self).__init__()
        self.linear = nn.Linear(input_size, num_classes)
        self.linear_1 = nn.Linear(num_classes, 6400)
    def forward(self, x):
        x = self.linear(x)
        output = self.linear_1(x)
        pred = torch.max(output, 1)

        return output, pred