Hi, I am constructing my model using this architecture (DQN):
class Network(nn.Module):
    def __init__(self, in_dim: int, out_dim: int):
        super(Network, self).__init__()

        
        self.layers = nn.Sequential(
            nn.Linear(in_dim, 256),
            nn.ReLU(),
            nn.Linear(256, 128),
            nn.ReLU(),
            nn.Linear(128, 64),
            nn.ReLU(),
            nn.Linear(64, out_dim),
            nn.ReLU())
        
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.layers(x)

and after testing my trained model I had around 95% accuracy.
However, when I saved the model and tried to load it afterward the model won’t
act as it should and it gives around 50% accuracy as if it was just choosing randomly.
I tried all the methods I found on the internet but it was all in vain.
image874×551 138 KB
But none of them seems to be working… what am I doing wrong please?