Reputation: 895
When I try:
normalization_layer = layers.Rescaling(1./255)
error message:
AttributeError: module 'tensorflow.keras.layers' has no attribute 'Rescaling'
How to fix it?
Upvotes: 3
Views: 9824
Reputation: 397
I had the same error in v2.5.0
tf.keras.layers.experimental.preprocessing.Rescaling()
I guess this is the "old" way to use this layer
Upvotes: 5
Reputation: 895
Yes, I used a wrong version of tf. Rescaling in tf v2.70, i used v2.60.
A preprocessing layer which rescales input values to a new range. Inherits From: Layer, Module
tf.keras.layers.Rescaling(
scale, offset=0.0, **kwargs
)
Upvotes: 0