ptrblck:

torch.utils.data.random_split(patch_A ,[0.7*len(patch_A), 0.3*len(patch_A)])


It give me the  error
Traceback (most recent call last):
File “E:/example/DataLoader.py”, line 30, in 
train_A_dataset , test_A_dataset= torch.utils.data.random_split(patch_A, [0.7len(patch_A), 0.3len(patch_A)])
File “C:\Users\lib\site-packages\torch\utils\data\dataset.py”, line 274, in random_split
indices = randperm(sum(lengths)).tolist()
TypeError: randperm(): argument ‘n’ (position 1) must be int, not float