Yes there is a dropout ,the first is a linear layer with weight set to num_features*num_hidden_dimension
Since num_features is very large almost 65,000
I decided to use a dropout after the first layer.
Also,I replaced model.eval() with  "with torch.set_grad_enabled(False) that did the trick.
I have some other questions,if you don’t mind.
At the end of epoch 4,train loss is 32.7 and val loss comes out to be 21,similarly
at end of epoch 5,train loss is 8.07 and val loss is approximately 4.So,it seems that the model is underfitting  here right.
Also,once I train the autoencoder,how can I use the model for regression purposes.The objective here is to use the model to predict the x,y and z coordinates similar to the ones defined in the npy file
I am thinking that for a new I new image(256x256),I flatten it to a 1d array and then append a 3x1 vector set to zeros.I will the feed this to the model,which can then predict a new representation.
The model is as follows
class AutoEncoder(torch.nn.Module):
    
    def __init__(self,num_features,num_hidden_1,num_hidden_2,num_hidden_3=256):
        super(AutoEncoder,self).__init__()
        #Encoder
        self.linear_1=nn.Linear(num_features,num_hidden_1)
        self.bn_1=nn.BatchNorm1d(num_hidden_1)
        self.linear_11=nn.Linear(num_hidden_1,num_hidden_2)
        self.bn_2=nn.BatchNorm1d(num_hidden_2)
        #Decoder
        self.linear_21=nn.Linear(num_hidden_2,num_hidden_3)
        self.linear_22=nn.Linear(num_hidden_3,num_features)
        self.bn_3=nn.BatchNorm1d(num_hidden_3)
        self.drop=nn.Dropout(p=0.5)
    
    def forward(self,x):
        encoder=F.leaky_relu(self.bn_1(self.linear_1(x)))
        encoder=self.drop(encoder)
        encoder=F.leaky_relu(self.bn_2(self.linear_11(encoder)))
        decoded=F.leaky_relu(self.bn_3(self.linear_21(encoder)))
        decoded=self.linear_22(decoded)
        return decoded
```. 

load model
new feature vector of dimension [256x256x1+3,1]
new_representation=model(new_feature_vector)
Is that the correct way to do this?