For prepare_PhysioNetP300.py. The correct code should be
spath = os.path.join(dataset_fold, f'{y}')
os.makedirs(spath, exist_ok=True) # create the correct folder
spath = os.path.join(spath, f'{i}.sub{sub}.pt') # add .pt for PyTorch files
torch.save(x, spath)
For prepare_PhysioNetP300.py. The correct code should be
spath = os.path.join(dataset_fold, f'{y}')
os.makedirs(spath, exist_ok=True) # create the correct folder
spath = os.path.join(spath, f'{i}.sub{sub}.pt') # add .pt for PyTorch files
torch.save(x, spath)