We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdd5d5c commit d98e68eCopy full SHA for d98e68e
tests/link/pytorch/test_basic.py
@@ -307,20 +307,14 @@ def test_pytorch_MakeVector():
307
def test_pytorch_OpFromGraph():
308
x, y, z = matrices("xyz")
309
ofg_1 = OpFromGraph([x, y], [x + y])
310
- OpFromGraph([x, y], [x * y, x - y])
+ ofg_2 = OpFromGraph([x, y], [x * y, x - y])
311
312
- # o1, o2 = ofg_2(y, z)
313
- # out = ofg_1(x, o1) + o2
314
-
315
- out = ofg_1(y, z)
+ o1, o2 = ofg_2(y, z)
+ out = ofg_1(x, o1) + o2
316
317
xv = np.ones((2, 2), dtype=config.floatX)
318
- np.ones((2, 2), dtype=config.floatX) * 3
+ yv = np.ones((2, 2), dtype=config.floatX) * 3
319
zv = np.ones((2, 2), dtype=config.floatX) * 5
320
321
- f = FunctionGraph([y, z], [out])
322
- import pytensor.printing
323
324
- pytensor.printing.debugprint(f)
325
326
- compare_pytorch_and_py(f, [xv, zv])
+ f = FunctionGraph([x, y, z], [out])
+ compare_pytorch_and_py(f, [xv, yv, zv])
0 commit comments