Skip to content

Commit d4714d2

Browse files
committed
Remove unnecessary gradient related methods from dummy Ops
1 parent c8f3704 commit d4714d2

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

pymc/logprob/transform_value.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import numpy as np
1818

19-
from pytensor.gradient import DisconnectedType
2019
from pytensor.graph import Apply, Op
2120
from pytensor.graph.features import AlreadyThere, Feature
2221
from pytensor.graph.fg import FunctionGraph
@@ -44,15 +43,9 @@ def make_node(self, tran_value: TensorVariable, value: TensorVariable):
4443
def perform(self, node, inputs, outputs):
4544
raise NotImplementedError("These `Op`s should be removed from graphs used for computation.")
4645

47-
def connection_pattern(self, node):
48-
return [[True], [False]]
49-
5046
def infer_shape(self, fgraph, node, input_shapes):
5147
return [input_shapes[0]]
5248

53-
def grad(self, args, g_outs):
54-
return g_outs[0], DisconnectedType()()
55-
5649

5750
transformed_value = TransformedValue()
5851

@@ -79,9 +72,6 @@ def perform(self, node, inputs, outputs):
7972
"`TransformedRV` `Op`s should be removed from graphs used for computation."
8073
)
8174

82-
def connection_pattern(self, node):
83-
return [[True] for _ in node.outputs]
84-
8575
def infer_shape(self, fgraph, node, input_shapes):
8676
return input_shapes
8777

0 commit comments

Comments
 (0)