ERROR! Session/line number was not unique in database. History logging moved to new session 64

hi , i want to select randomly faces from test dataset anfter trained training folder of faces
i use facenet-pytorch library

optimizer = optim.Adam(resnet.parameters(), lr=0.001)
scheduler = MultiStepLR(optimizer, [5, 10])

trans = transforms.Compose([
   np.float32,
   transforms.ToTensor(),
   fixed_image_standardization
]) 
dataset = datasets.ImageFolder(data_dir, transform=trans)
img_inds = np.arange(len(dataset)) 
np.random.shuffle(img_inds)
train_inds = img_inds[:int(0.8 * len(img_inds))]
val_inds = img_inds[int(0.8 * len(img_inds)):]

train_loader = DataLoader(
   dataset,
   num_workers=workers,
   batch_size=batch_size,
   sampler=SubsetRandomSampler(train_inds)
)
val_loader = DataLoader(
val_inds,
batch_size=batch_size,
shuffle = True,
num_workers=workers,
)

how to select a face randomly in test data set to make prediction ?
the result of the code provide this error

val_inds,
^
SyntaxError: positional argument follows keyword argument

thanks

val_loader = DataLoader(
dataset,
num_workers=workers,
batch_size=batch_size,
val_inds,<-------------------------------------------------------
shuffle = True,

so whats wrong ?is there something i’ve missed

In python there are two type or function arguments, args and kwargs. Args are those which are identified by their position when you call the function. Kwargs are those which are identified by the name you pass.
In python you must past those without name and later those with name. so val inds needs something like: indices=val_inds (whatever the name of the argument is in the function)