Based on the shapes the calculation should be correct and it also seems the training loop prints a valid accuracy.
Could you post the code to calculate the validation accuracy directly using three backticks ``` please?
It’s a bit hard to follow your code structure using screenshots.