I'm building some dataloaders for training and testing a machine learning model. I have a list of tuples named "array" like this:
(Data(x=[468, 2], edge_index=[2, 1322], y=0, edge_weight=[1322]), 'morphed_img027485_img054553.png')
(Data(x=[468, 2], edge_index=[2, 1322], y=0, edge_weight=[1322]), 'morphed_img031737_img054553.png')
I create the dataloader like this:
data_loader = create_dataloader(array, batch_size=60)
save_dataloader(data_loader, 'NameofDataLoader')
The output is not what I expect but it combines all the data into a single DataBatch, as shown below:
[DataBatch(x=[936, 2], edge_index=[2, 2644], y=[2], edge_weight=[2644], batch=[936], ptr=[3]), ('morphed_img031737_img054553.png', 'morphed_img027485_img054553.png')]
Why? How can I have a dataloader with all the data separated like in the array?