CamDavidsonPilon / Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
http://camdavidsonpilon.github.io/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/
MIT License
26.71k stars 7.87k forks source link

Chapter 2 -- tfp.bijectors.AffineScalar is deprecated #541

Open joaoppadua opened 2 years ago

joaoppadua commented 2 years ago

Executing the code for the model in the Challenger Space Shuttle Disaster example, it returns an AttributeError, roughly "tfp.bijectors has no attribute AffineScalar". After an unusually long search in the internet, I found that, as per this source (https://github.com/tensorflow/probability/releases), this attribute is indeed deprecated. The release said to use tfp.Shift(shift) or tfp.Scale(scale), instead. Since the code called for a multiplying factor, I substituted the line for tp.bijectors.Scale(100.). It worked fine.