Developing a multi output reader able to feed into the DataLoader of gluoncv, but I encounter an issue.
def __getitem__(self, idx):
base = mx.image.imread(self._image_list[idx])
if self._transform is not None:
base = self._transform(base)
#self._label_list[idx] is a list, self._label_list[idx][0] is a ndarray, which encode label with one hot
return base, self._label_list[idx][0], self._label_list[idx][1] //this size of the tuple could change
I would like to return self._label_list[idx](return list do not accepted by DataLoader) rather than split them up to self._label_list[idx][0], self._label_list[idx][1] because the size of the outputs may vary(the network could more than two branches).
How could I solve this issue?Thanks
Edit : source codes put at github