Apologies if this is a basic question. In the following python code I try to normalize a simple tensor using a Google Colab notebook.
import tensorflow as tf
import pandas as pd
from tensorflow.keras.layers import Normalization
normalizer = Normalization(mean=5, variance=4)
x_normalized = tf.constant([[3,4,5,6,7],
[4,5,6,7,8]])
normalizer(x_normalized)
What am I doing wrong? I get the error: InvalidArgumentError: {{function_node _wrapped__Reshape_device/job:localhost/replica:0/task:0/device:CPU:0}} Input to reshape is a tensor with 1 values, but the requested shape has 5 [Op:Reshape]
I tried reinstalling tensorflow.keras.Normalization, without success. Is there an issue with tensorflow.keras in a Google colab notebook?