zabaras/transformer-physx

Maybe a mistake in the current code.

shuizidesu opened this issue · 1 comments

Dear authors:

Thanks for your interesting and inspirational work! But I think there may be a minor mistake in the provided codes. In the file embedding_lorenz.py, the following codes are included

        # Test accuracy of one time-step
        for i in range(xInput.size(1)):
            xInput0 = xInput[:,i].to(device)
            g0 = self.embedding_model.embed(xInput0)
            yPred0 = self.embedding_model.recover(g0)
            yPred[:,i] = yPred0.squeeze().detach()

        test_loss = mseLoss(yTarget, yPred)

I think it should be

        # Test accuracy of one time-step
        for i in range(xInput.size(1)):
            xInput0 = xInput[:,i].to(device)
            g0 = self.embedding_model.embed(xInput0)
            g0 = self.embedding_model.koopmanOperation(g0)
            yPred0 = self.embedding_model.recover(g0)
            yPred[:,i] = yPred0.squeeze().detach()

        test_loss = mseLoss(yTarget, yPred)

for its practical effect.

I agree. I have the same comment