Skip to content

Commit

Permalink
Clarify documentation of labels_train/test usage wrt loss_train/test.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 665469121
  • Loading branch information
tensorflower-gardener committed Sep 3, 2024
1 parent 66d05a2 commit e67b1c3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ class AttackInputData:
# Contains ground-truth classes. For single-label classification, classes are
# assumed to be integers starting from 0. For multi-label classification,
# label is assumed to be multi-hot, i.e., labels is a binary array of shape
# (num_examples, num_classes).
# (num_examples, num_classes). Additionally used to compute the loss when
# loss_train/test is not provided. Leave empty for non-classification models.
labels_train: Optional[np.ndarray] = None
labels_test: Optional[np.ndarray] = None

Expand All @@ -270,7 +271,7 @@ class AttackInputData:
sample_weight_test: Optional[np.ndarray] = None

# Explicitly specified loss. If provided, this is used instead of deriving
# loss from logits and labels
# loss from logits and labels.
loss_train: Optional[np.ndarray] = None
loss_test: Optional[np.ndarray] = None

Expand Down

0 comments on commit e67b1c3

Please sign in to comment.