Skip to content

Commit ef1e7dd

Browse files
emilyfertigtensorflower-gardener
authored andcommitted
Replace use of deprecated AffineScalar bijector.
PiperOrigin-RevId: 379723321
1 parent 8fa76c9 commit ef1e7dd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spinoffs/fun_mc/fun_mc/fun_mc_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ def log_prob_fn(x, y):
372372
tfp.distributions.Normal(self._constant(1.), 1.).log_prob(y)), ()
373373

374374
bijectors = [
375-
tfp.bijectors.AffineScalar(scale=self._constant(2.)),
376-
tfp.bijectors.AffineScalar(scale=self._constant(3.))
375+
tfp.bijectors.Scale(scale=self._constant(2.)),
376+
tfp.bijectors.Scale(scale=self._constant(3.))
377377
]
378378

379379
(transformed_log_prob_fn,
@@ -399,8 +399,8 @@ def log_prob_fn(x, y):
399399
tfp.distributions.Normal(self._constant(1.), 1.).log_prob(y)), ()
400400

401401
bijectors = {
402-
'x': tfp.bijectors.AffineScalar(scale=self._constant(2.)),
403-
'y': tfp.bijectors.AffineScalar(scale=self._constant(3.))
402+
'x': tfp.bijectors.Scale(scale=self._constant(2.)),
403+
'y': tfp.bijectors.Scale(scale=self._constant(3.))
404404
}
405405

406406
(transformed_log_prob_fn,

0 commit comments

Comments
 (0)