I assume you have a test set with input data and the corresponding targets.
If that’s the case, you should pass the test targets to the criterion.
If you don’t have test targets, could you explain the use case a bit?
E.g. how did you collect the test target and how would you like to calculate the loss?