Unverified Commit 892f9ea0 authored by Erfan Zekri Esfahani's avatar Erfan Zekri Esfahani Committed by GitHub
Browse files

import required torch and numpy libraries (#25483)

parent fe3c8ab1
...@@ -221,6 +221,10 @@ logits first, and then reshaped to match the size of the labels before you can c ...@@ -221,6 +221,10 @@ logits first, and then reshaped to match the size of the labels before you can c
<pt> <pt>
```py ```py
>>> import numpy as np
>>> import torch
>>> from torch import nn
>>> def compute_metrics(eval_pred): >>> def compute_metrics(eval_pred):
... with torch.no_grad(): ... with torch.no_grad():
... logits, labels = eval_pred ... logits, labels = eval_pred
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment