Thank you for the code.
Could you tell me the following?

What is the meaning of the term accuracy_temp? What do you intend this term to contain?
Why does it make sense to accumulate accuracy_temp values across batches by adding them?
Why does it make sense to divide the summed-up  accuracy_temp values by the number of things in dataloader?

For instance: suppose your net predicted half of the targets correctly in every batch. What would computing accuracy in this manner give you as the final accuracy value? Does this match the accuracy value that you expect to get, if your net was good at predicting exactly half of the targets in each batch correctly?
I have the same questions about logit as well: why does it make sense to add them up over batches, and why does it make sense to divide this sum by the total number of items in the input?