Unverified Commit 6fa93086 authored by Nicolas Hug's avatar Nicolas Hug Committed by GitHub
Browse files

Use torch.testing.assert_close in test_transforms_video.py (#3886)


Co-authored-by: default avatarPhilip Meier <github.pmeier@posteo.de>
parent 97b05a89
......@@ -4,6 +4,7 @@ import unittest
import random
import numpy as np
import warnings
from _assert_utils import assert_equal
try:
from scipy import stats
......@@ -120,7 +121,7 @@ class TestVideoTransforms(unittest.TestCase):
# Checking the optional in-place behaviour
tensor = torch.rand((3, 128, 16, 16))
tensor_inplace = transforms.NormalizeVideo((0.5, 0.5, 0.5), (0.5, 0.5, 0.5), inplace=True)(tensor)
self.assertTrue(torch.equal(tensor, tensor_inplace))
assert_equal(tensor, tensor_inplace)
transforms.NormalizeVideo((0.5, 0.5, 0.5), (0.5, 0.5, 0.5), inplace=True).__repr__()
......
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