Closed yang12138std closed 3 months ago
This is because we need to ensure that the lengths of trainset_u and trainset_l are consistent, so that they can be merged into a dataloader
using zip()
. What really plays a role in data isolation is the incoming id_path
.
Used in trainset_l
if num is not None:
self.image_list = self.image_list * 21
self.image_list = self.image_list[:num]
to ensure that the same length as trainset_u
is obtained.