|
4 | 4 | import numpy as np |
5 | 5 | import pytest |
6 | 6 |
|
7 | | -import pytensor.tensor as pt |
8 | 7 | import pytensor.tensor.basic as ptb |
9 | 8 | from pytensor.compile.builders import OpFromGraph |
10 | 9 | from pytensor.compile.function import function |
|
18 | 17 | from pytensor.ifelse import ifelse |
19 | 18 | from pytensor.link.pytorch.linker import PytorchLinker |
20 | 19 | from pytensor.raise_op import CheckAndRaise |
21 | | -from pytensor.tensor import alloc, arange, as_tensor, empty, eye |
| 20 | +from pytensor.tensor import alloc, arange, as_tensor, empty, expit, eye, softplus |
22 | 21 | from pytensor.tensor.type import matrices, matrix, scalar, vector |
23 | 22 |
|
24 | 23 |
|
@@ -348,13 +347,13 @@ def test_pytorch_OpFromGraph(): |
348 | 347 |
|
349 | 348 | def test_pytorch_scipy(): |
350 | 349 | x = vector("a", shape=(3,)) |
351 | | - out = pt.expit(x) |
| 350 | + out = expit(x) |
352 | 351 | f = FunctionGraph([x], [out]) |
353 | 352 | compare_pytorch_and_py(f, [np.random.rand(3)]) |
354 | 353 |
|
355 | 354 |
|
356 | 355 | def test_pytorch_softplus(): |
357 | 356 | x = vector("a", shape=(3,)) |
358 | | - out = pt.softplus(x) |
| 357 | + out = softplus(x) |
359 | 358 | f = FunctionGraph([x], [out]) |
360 | 359 | compare_pytorch_and_py(f, [np.random.rand(3)]) |
0 commit comments