Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
hkvision committed Nov 2, 2020
1 parent a9618ea commit b527063
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyzoo/zoo/orca/learn/pytorch/training_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,9 @@ def validate_batch(self, batch, batch_info):
# Can't directly call torch.squeeze() in case batch size is 1.
for i in reversed(range(1, len(_target.size()))):
_target = torch.squeeze(_target, i)
error_msg = "Currently in validate, only accuracy for classification with zero-based label is supported " \
"by default. You can override validate_batch in TrainingOperator for other validation metrics"
error_msg = "Currently in validate, only accuracy for classification with zero-based " \
"label is supported by default. You can override validate_batch in " \
"TrainingOperator for other validation metrics"
assert len(_target.size()) == 1, error_msg

if self.use_gpu:
Expand Down

0 comments on commit b527063

Please sign in to comment.