herleeyandi:

So if I am using test data as validation data, is it good for doing so?


No, its not good.
You should split the training set into a train and validation sets. I show how to do it here:
(https://github.com/QuantScientist/Deep-Learning-Boot-Camp/blob/master/day%2002%20PyTORCH%20and%20PyCUDA/PyTorch/21-PyTorch-CIFAR-10-Custom-data-loader-from-scratch.ipynb 1.9k)

class FullTrainingDataset(torch.utils.data.Dataset):
def init(self, full_ds, offset, length):
self.full_ds = full_ds
self.offset = offset
self.length = length
assert len(full_ds)>=offset+length, Exception(“Parent Dataset not long enough”)
super(FullTrainingDataset, self).init()
def __len__(self):
    return self.length

def __getitem__(self, i):
    return self.full_ds[i+self.offset]

def trainTestSplit(dataset, val_share=TEST_RATIO):
val_offset = int(len(dataset)*(1-val_share))
return FullTrainingDataset(dataset, 0, val_offset), FullTrainingDataset(dataset, val_offset, len(dataset)-val_offset)
train_ds, val_ds = trainTestSplit(dset_train)
train_loader = torch.utils.data.DataLoader(train_ds, batch_size=BATCH_SIZE,
shuffle=True, num_workers=1,pin_memory=PIN_MEMORY)
val_loader = torch.utils.data.DataLoader(val_ds, batch_size=BATCH_SIZE, shuffle=True, num_workers=1,
pin_memory=PIN_MEMORY)