It looks like you’ve added the Dropout module (and its initialization) into your forward method.
This still won’t work and you should register it as a module in your __init__ method:
class AlexNetTest(nn.Module):
    def __init__(self):
        super(AlexNetTest, self).__init__()
        ...
        self.drop1 = nn.Dropout(p=0.5)

    def forward(self, x):
        ...
        x = self.drop1(torch.tanh(self.F8(x))

In your Dataset you are normalizing the data to the range [0, 1], while in your small numpy script you are loading the data from the plain numpy arrays. Are you preprocessing the images somehow in your Keras script? Could you check the range of your data using the Dataset and your manual approach?
As a small side note: Variables are deprecated since PyTorch 0.4.0. If you are using a newer version, you can just use tensors instead.
This might also be the issue for the performance difference, since the performance is increased in newer versions.