(self)
| 221 | equal_distribution(lambda *x: Tensor.rand(*x, dtype=dtypes.bfloat16).float(), torch.rand, lambda x: np.random.rand(*x), shape=(2, N, N)) |
| 222 | |
| 223 | def test_rand_like(self): |
| 224 | empty = Tensor.empty((80, 44)) |
| 225 | rand = Tensor.rand_like(empty) |
| 226 | assert rand.shape == empty.shape |
| 227 | assert rand.dtype == empty.dtype |
| 228 | assert rand.device == empty.device |
| 229 | |
| 230 | def test_randn_like(self): |
| 231 | empty = Tensor.empty((80, 44)) |