Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/sst2/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
class Metrics(struct.PyTreeNode):
"""Computed metrics."""

loss: float
accuracy: float
loss: Array
accuracy: Array
count: int | None = None


Expand Down Expand Up @@ -166,7 +166,7 @@ def normalize_batch_metrics(batch_metrics: Sequence[Metrics]) -> Metrics:
)


def batch_to_numpy(batch: dict[str, tf.Tensor]) -> dict[str, Array]:
def batch_to_numpy(batch: dict[str, Array]) -> dict[str, Array]:
"""Converts a batch with TF tensors to a batch of NumPy arrays."""
# _numpy() reuses memory, does not make a copy.
# pylint: disable=protected-access
Expand Down
Loading