File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
pymc_experimental/model/transforms Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 19
19
model_from_fgraph ,
20
20
model_named ,
21
21
)
22
- from pymc .pytensorf import constant_fold , toposort_replace
22
+ from pymc .pytensorf import toposort_replace
23
23
from pytensor .graph .basic import Apply , Variable
24
24
from pytensor .tensor .random .op import RandomVariable
25
25
@@ -176,8 +176,12 @@ def vip_reparam_node(
176
176
) -> Tuple [ModelDeterministic , ModelNamed ]:
177
177
if not isinstance (node .op , RandomVariable | SymbolicRandomVariable ):
178
178
raise TypeError ("Op should be RandomVariable type" )
179
- rv = node .default_output ()
180
- [rv_shape ] = constant_fold ([rv .shape ], raise_if_not_constant = False )
179
+ _ , size , * _ = node .inputs
180
+ eval_size = size .eval ()
181
+ if eval_size is not None :
182
+ rv_shape = tuple (eval_size )
183
+ else :
184
+ rv_shape = ()
181
185
lam_name = f"{ name } ::lam_logit__"
182
186
_log .debug (f"Creating { lam_name } with shape of { rv_shape } " )
183
187
logit_lam_ = pytensor .shared (
You can’t perform that action at this time.
0 commit comments