I am trying to run a TensorFlow model on M1 Mac with the following settings:
MacBook Pro M1
macOS 12.4
tensorflow-deps & tensorflow-estimator --> 2.9.0
tensorflow-macos --> 2.9.2
tensorflow-metal --> 0.5.0
keras --> 2.9.0
keras-preprocessing --> 1.1.2
Python 3.8.13
When resizing and rescaling from keras.layers, I got the following error:
resize_and_rescale = keras.Sequential([
layers.experimental.preprocessing.Resizing(IMAGE_SIZE, IMAGE_SIZE),
layers.experimental.preprocessing.Rescaling(1./255),
])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [15], in <cell line: 1>()
1 resize_and_rescale = keras.Sequential([
----> 2 layers.experimental.preprocessing.Resizing(IMAGE_SIZE, IMAGE_SIZE),
3 layers.experimental.preprocessing.Rescaling(1./255),
4 ])
AttributeError: module 'keras.layers' has no attribute 'experimental'
Any suggestions? Thanks