I have a Problem with tensorflow-probability, I want to calculate the variance of my tensor using
tfp.stats.variance(E)
But I am always getting the following error message:
AttributeError: module 'tensorflow_probability' has no attribute 'stats'
I have searched for hours through the internet and the forum, but nothing helped me, so I am asking the question hoping someone can help me. I am using the tensorflow version: 2.13.0.
And I am using python on a MacBook and visual studio code
When I run pip3 list I get the following:
tensorflow 2.13.0
tensorflow-estimator 2.13.0
tensorflow-io-gcs-filesystem 0.33.0
tensorflow-probability 0.20.1
tfp-nightly 0.22.0.dev20230925
Thank you in advance
Best wishes
I have searched for hours through the internet and the forum, but nothing helped me, so I am asking the question hoping someone can help me.
Can you try Installing the latest version of tfp. I tried with updated version in my local and its working good
Install
pip install --user tensorflowInstall tfp
pip install --upgrade tensorflow-probabilityTo keep it simple, I tried the below code
Resulted Output :
Hope this helps.