Writing unit tests

I want to write unit tests with the unittest package. How would I compare two tensors? I’m looking for something like self.assertEqual(tensor1, tensor2). Is there a package with unit test utils?

1 Like

I have the same question. It seems there are some testing utils in the repo https://github.com/pytorch/pytorch/blob/master/test/common.py
but I don’t think they’re exposed in the distribution package, are they?