How to make two different training dataset?

Hi, everyone.

I have problem with making two different training dataset having each different training condition.

In my input dataset structure likes below,

/data

  • folder1 /
    m6dB/ img0, 1, 2 …
    m3dB/ img0, 1, 2 …
    0dB/ img0, 1, 2 …
    3dB/ img0, 1, 2 …
    6dB/ img0, 1, 2 …
    9dB/ img0, 1, 2 …

  • folder2 /
    spk1/ img…
    spk2/ img…
    spk3/ img…
    spk4/ img…

In this case, i want to fix all the folder 1’s imgs (ex. img0.png, img1.png …) target to 9dB/img
(ex, criterion(m6dB/img0.png , 9dB/img0.png))

and imgs of folder 2 shold be random selected by the number of images of folder 1, on every epoch.

how can i get these things?