File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ def _get_expected_file(name=None):
81
81
82
82
# Note: for legacy reasons, the reference file names all had "ModelTest.test_" in their names
83
83
# We hardcode it here to avoid having to re-generate the reference files
84
- expected_file = expected_file = os .path .join (expected_file_base , "ModelTester.test_" + name )
84
+ expected_file = os .path .join (expected_file_base , "ModelTester.test_" + name )
85
85
expected_file += "_expect.pkl"
86
86
87
87
if not ACCEPT and not os .path .exists (expected_file ):
@@ -665,6 +665,7 @@ def check_out(out):
665
665
assert len (out ) == 1
666
666
667
667
def compact (tensor ):
668
+ tensor = tensor .cpu ()
668
669
size = tensor .size ()
669
670
elements_per_sample = functools .reduce (operator .mul , size [1 :], 1 )
670
671
if elements_per_sample > 30 :
You can’t perform that action at this time.
0 commit comments