Sample and label not aligned in Documentation
LbzSteven opened this issue · comments
Describe the bug
In the how-to documentation:https://fzi-forschungszentrum-informatik.github.io/TSInterpret/Notebooks/TSEvo_torch/
test_loader = torch.utils.data.DataLoader(test_dataset,batch_size=1,shuffle=True)
bservation_01, label_01 = test_dataset[0]
model.eval()
y_pred,labels= get_all_preds(model,test_loader)
label_01=np.array([y_pred[0]])
print(observation_01.shape)
print(label_01.shape)
The test loader will undergo the shuffle and the label of the first batch will not be the first one in the dataset.
In the sample code, the oberservation_01 is from the first of test_dataset and label_01 is given as the value of y_pred[0], they are not aligned I think.
Hi @LbzSteven,
thanks for reporting the issue. I think I fixed it in the most notebooks.
Feel free to come back with any other issue you find.