Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tensorflow_core._api.v2.random has no attribute Generator

Tags:

tensorflow

I am seeing the following error when I try to import tensorflow_addons with tensorflow 2.1

> import tensorflow_addons as tfa
AttributeError: module 'tensorflow_core._api.v2.random' has no attribute 'Generator'
like image 710
Narek Avatar asked Sep 13 '25 11:09

Narek


1 Answers

There is an incompability between your Tensorflow and Tensorflow-addons versions. To solve your problem, uninstall your current version and replace it with the right one which you can get by checking this table

A little reminder: To check your Tensorflow version type in terminal:

python -c 'import tensorflow as tf; print(tf.__version__)'
like image 162
ouba64 Avatar answered Sep 16 '25 08:09

ouba64



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!