My NN is defined as follows:
class Char_CNN(nn.Module):
def __init__(self):
    super(Char_CNN, self).__init__()
    self.convdx = torch.nn.Sequential(OrderedDict([
        ('convx', nn.Conv1d(1, 12, 20)),
        ('poolx', nn.MaxPool1d(3)),
        ('xre', nn.ReLU(True))
        ]))
    self.convdy = torch.nn.Sequential(OrderedDict([
        ('convy', nn.Conv1d(1, 12, 20)),
        ('pooly', nn.MaxPool1d(3)),
        ('yre', nn.ReLU(True))
        ]))
    self.convdz = torch.nn.Sequential(OrderedDict([
        ('convz', nn.Conv1d(1, 12, 20)),
        ('poolz', nn.MaxPool1d(3)),
        ('zre', nn.ReLU(True))
        ]))

    self.fc = nn.Sequential(
        nn.Linear(540, 1024),
        # nn.Dropout(0.5),
        nn.BatchNorm1d(1024),
        nn.ReLU(True),
        nn.Linear(1024, 30),
        nn.Dropout(0.5),
        nn.BatchNorm1d(30),
        nn.ReLU(True),
        nn.Linear(30, 13)
    )

def forward(self, x):
    after_convd = (self.convdx(x[:, :, 0]), self.convdy(x[:, :, 1]), self.convdz(x[:, :, 2]))  # 卷积

    x = torch.cat(after_convd, 2)  # 拼接，更新x
    x = x.view(x.size(0), -1)  # 展开成一维
    x = self.fc(x)
    # x = F.softmax(x)
    return x

And I choose the CrossEntropyLoss as my loss function.
However, during the training, it can’t work well.
In fact, the accuracy was only 0.07, and the loss was keeping at 012825 from start to end.
As a noviciate to deep learning and pytorch, I’ve done everything I can.
Appreciate deeply for any help!