Thank you @ptrblck that worked perfectly.
On an urrelated topic, the cross entropy loss is coming too high, it oscillated between 15-25. train and dataloaders are given below. Could you please help me out with it.
    def train_model(self, data, model, epochs):
        cudnn.benchmark = True
        model.train()
        model.cuda()
        optimizer = torch.optim.Adam(model.parameters())
        loss = []
        min_loss = 100 # a random high value so that model loss is 
                       #always less than this value
        for epoch in range(0, epochs+1):
            avg_loss = 0
            st = time.time()
            for _,(x, y) in enumerate(data):
                optimizer.zero_grad()
                x = x.reshape(1, 22, 313)
                x = x.float().cuda()
                y = y.long().cuda()
                out = model(x)
                print(out)
                loss = self.criterion(out, y)
                loss.backward()
                optimizer.step()
                avg_loss += loss.item()

            et = time.time()
            print('--------------------------------------------------------------')
            print('TIME')
            print(et-st)
            print('LOSS')
            print(avg_loss/len(data))
            loss.append(avg_loss/len(data))
            if (avg_loss/len(data) < min_loss):
                torch.save(model.state_dict(), 'Conv.pth')
                min_loss = avg_loss/len(data)
        plt.scatter(loss, numpy.arange(10))
        plt.show()
        print('--------------   DONE TRAINING  -----------------')

the dataloader
def dataloader_train(path):
    os.chdir(path)
    train_data = []
    Data = []
    Labels = []
    classes = {'769':int(0), '770':int(1), '771':int(2), '772':int(3)}
    folders = ['769', '770', '771', '772']
    for folder in folders:
        files = os.listdir(path + '/' + folder)
        os.chdir(path + '/' + folder)
        for file in files:
            data = numpy.load(file)
            data = numpy.transpose(data)
            #Data.append(data)
            #Labels.append((int(folder)))
            train_data.append([data, torch.tensor(data=(classes[folder]), dtype=torch.int64)])

    train_loader = torch.utils.data.DataLoader(train_data, batch_size=1, shuffle=True)
    return train_loader, train_data

The Least loss this model could obtain was 15 where as the training parameters are a lot(way more than a million). Any idea why?