my code is here
import torch
torch.cuda.is_available() // it was True
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torchvision import datasets,transforms
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sn
from sklearn.metrics import confusion_matrix
trans = transforms.ToTensor()
train_data = datasets.CIFAR10(root = “C:/Users/vamsi”,train = True,download = True,transform = trans)
test_data = datasets.CIFAR10(root = “C:/Users/vamsi”,train = False,download = True,transform = trans)
class ConvolutionalNetwork(nn.Module):
def init(self):
super().init()
self.conv1 = nn.Conv2d(3,6,5,1)
self.conv2 = nn.Conv2d(6,16,3,1)
self.fc1 = nn.Linear(1666,120)
self.fc2 = nn.Linear(120,84)
self.fc3 = nn.Linear(84,10)
def forward(self,x):
    x = F.relu(self.conv1(x))
    x = F.max_pool2d(x,2,2)
    x = F.relu(self.conv2(x))
    x = F.max_pool2d(x,2,2)
    x = F.relu(self.fc1(x.view(-1,16*6*6)))
    x = F.relu(self.fc2(x))
    x = F.log_softmax(self.fc3(x),dim =1)
    return x

model = ConvolutionalNetwork()
model.cuda()
next(model.parameters()).is_cuda // it was true
criterion = torch.nn.CrossEntropyLoss()
optimizer = torch.optim.Adam(model.parameters(),lr = 0.001)
start_time = time.time()
#trackers
epochs = 13
train_correct = []
test_correct = []
train_loss = []
test_loss = []
for i in range(epochs):
trn_corr = 0
tst_corr = 0
for b,(x_train,y_train) in enumerate(train_load):
b += 1
y_pred = model.forward(x_train.cuda())
loss = criterion(y_pred,y_train.cuda())
pred = torch.max(y_pred.data ,1)[1]
trn_corr += (pred == y_train.cuda()).sum()
optimizer.zero_grad()
loss.backward()
optimizer.step()
    if b%500 == 0:
        
        print(f'EPOCH:{i} BATCH:{b} acuracy:{trn_corr.item()*100/(b*10)} loss:{loss.item()}')
        
        
train_loss.append(loss)
train_correct.append(trn_corr)


with torch.no_grad():
    for b,(x_test,y_test) in enumerate(test_load):
        y_val = model.forward(x_test.cuda().type(torch.float32))
        predict = torch.max(y_val.data,1)[1]
        tst_corr += (predict == y_test.cuda().type(torch.float32)).sum()
        loss = criterion(y_val,y_test.cuda())
        
    
test_loss.append(loss)
test_correct.append(tst_corr)

print(f’total time taken = {(start_time-time.time())/60} ')