i finding y_pred and y_true for build a confusion matrix but this part i want them to display image that my model predicted is wrong while i looping my dataloader.
You could collect the tensors via a list comprehension:
incorrect = [inputs[i] if output[i] == labels[i] for i in range(len(labels))]
Then you could use something like
imshow to visualize the tensor