Hi ptrblck, I am quite confused about how can we simultaneously load the datasets if both datasets are different?
Iām not sure what ādifferentā would mean in this context. In the previously described use case Iāve suggested to load the image pairs in a single custom Dataset
instead of creating multiple Dataset
s and loaders, which seems to have worked fine. Are you seeing any issues using this approach?
Even if you create your own indices, doesnāt SubsetRandomSampler
still randomly permute the indices, leading to mismatch? (See below)
def __iter__(self) -> Iterator[int]:
for i in torch.randperm(len(self.indices), generator=self.generator):
yield self.indices[i]
No, since yield self.indices[i]
is used, so you are randomly indexing the passed self.indices
, which contain your designed subset.