Skip to content

Commit d5dc9cc

Browse files
committed
avoid creating float64 tensors when possible
1 parent 2806c23 commit d5dc9cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymc/variational/opvi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,11 +1073,11 @@ def symbolic_normalizing_constant(self):
10731073
for v in self.group
10741074
if isinstance(v.owner.op, MinibatchRandomVariable)
10751075
]
1076-
+ [1.0] # To avoid empty max
1076+
+ [pm.floatX(1.0)] # To avoid empty max
10771077
)
10781078
)
10791079
t = self.symbolic_single_sample(t)
1080-
return pm.floatX(t)
1080+
return t
10811081

10821082
@node_property
10831083
def symbolic_logq_not_scaled(self):

0 commit comments

Comments
 (0)