Hey guys,
I trained my CIFAR-10 full precision network using vgg architecture. I  got a 92.27 percent accuracy on the validation set. However, when I saved and loaded the model and then tested using the loop, I am getting only 35 percent accuracy. I am pretty sure the file is not corrupted.
model=torch.load('/content/cifar_fullprecison_vgg8.pth')
import torch
class Ternary_batch_rel(torch.nn.Module):
    
  def __init__(self,batchnorm_size):
    super(Ternary_batch_rel,self).__init__()
    self.l1=torch.nn.Sequential(
    torch.nn.ReLU(),
    torch.nn.BatchNorm2d(batchnorm_size)
    )
  
  def forward(self,x):
    out=self.l1(x)
    return out
    
z1=Ternary_batch_rel(128).to(device)
z2=Ternary_batch_rel(256).to(device)
z3=Ternary_batch_rel(512).to(device)
class Ternary_max_pool(torch.nn.Module):
  def __init__(self):
    
    super(Ternary_max_pool,self).__init__()
    self.l1=torch.nn.Sequential(
    torch.nn.MaxPool2d(kernel_size=2,stride=2))
      
  def forward(self,x):
    out=self.l1(x)
    return out

zm=Ternary_max_pool().to(device)

Testing loop
correct=0
total=0
for images,labels in (train_loader):
  images=images.to(device)
  labels=labels.to(device)
  y1=F.conv2d(images,model['layer1.0.weight'],padding=1)
  y2=z1(y1)
  y2=F.conv2d(y2,model['layer1.3.weight'],padding=1)
  y3=z1(y2)
  y3=zm(y3)
  y4=F.conv2d(y3,model['layer2.0.weight'],padding=1)
  y4=z2(y4)
  y5=F.conv2d(y4,model['layer2.3.weight'],padding=1)
  y5=z2(y5)
  y6=zm(y5)
  y7=F.conv2d(y6,model['layer3.0.weight'],padding=1)
  y8=z3(y7)
  y9=F.conv2d(y8,model['layer3.3.weight'],padding=1)
  y10=z3(y9)
  y11=zm(y10)
  y11=y11.view(y11.size(0),-1)
  y12=F.linear(y11,model['layer4.0.weight'])
  y13=F.relu(y12)
  y14=F.dropout(y13)
  y15=F.linear(y14,model['layer4.3.weight'])
  _,predicted=torch.max(y15,1)
  total+=labels.size(0)
  correct+=(predicted==labels).sum().item()
print('Test accuracy of the model on the 10000 test images:{}%'.format((correct/total)*100))