Skip to content

Tag: tensorflow

Keras does not load because cannot find TensorFlow

Running Anaconda and installed: Keras = 2.4.3 TensorFlow = 2.4.0 However, when importing Keras – I get “Keras requires TensorFlow 2.2 or higher”. Tried uninstalling/installing – did not help. Any idea? Answer You can use to install an upgraded and compatible TensorFlow version in your …

Getting attribute error when using AUTOTUNE in Tensorflow?

I am using AUTOTUNE for audio processing. But i am getting attribute error which said “module ‘tensorflow._api.v2.data’ has no attribute ‘AUTOTUNE’”. Tensorflow version is 2.3.0. How to solve this? Answer According to the TensorFlow 2.3 documentation, AUTOTUNE lies under the tens…

Reshaping MNIST for ResNet50

I am trying to train the mnist dataset on ResNet50 using the Keras library. The shape of mnist is (28, 28, 1) however resnet50 required the shape to be (32, 32, 3) How can I convert the mnist dataset to the required shape? Answer You need to resize the MNIST data set. Note that minimum size actually depends o…