the train code is:
    for epoch in range(train_epoch):
        model.train()
        for step,(x,y) in enumerate(train_loader):

            x = x.cuda()
            y = y.cuda()
            Encoder,Decoder = model(x)

            loss = loss_func(Decoder,y)
            optimizer.zero_grad()
            loss.backward()
            optimizer.step()