The shape and the values of y look correct, so Ignite shouldn’t raise an issue.
Are you sure you’ve rerun the complete code (or cells)?
If so, could you directly print the shapes of y_pred and y before passing them to the criterion?