From 39251766cf182c4d82fe50c11708575e1f890d20 Mon Sep 17 00:00:00 2001 From: Noah Tye Date: Sat, 2 Mar 2024 10:45:19 -0800 Subject: [PATCH] check that your output is actually a tensor --- lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.py b/lib.py index becc77d..18c85d6 100644 --- a/lib.py +++ b/lib.py @@ -179,7 +179,7 @@ def make_test(name, problem, problem_spec, add_sizes=[], constraint=lambda d: d) for size in add_sizes: del example[size] example["target"] = tensor(out) - if yours is not None: + if torch.is_tensor(yours) and yours.ndim > 0: example["yours"] = yours examples.append(example)