Layer Normalization

Hi !
I am trying to train Audio speech commands project in Tensorflow js. But i am having issues with some of the functions in Js , as they are provided in Python api but not in Js.
How can i achieve this behaviour in Tensorflow js ?

norm_layer = layers.Normalization()
# Fit the state of the layer to the spectrograms
norm_layer.adapt(data=spectrogram_ds.map(map_func=lambda spec, label: spec))

And in model :

layers.Resizing(32, 32),
    # Normalize.
    norm_layer,

tf.layers does not have adapt or resize methods in Tensorflow js

The original tutorial is Simple audio

Hi @Hafiz_Muhammad_Athar ,

I apologize for the delay in my response.

In tfjs, you can use the tf.layers.resizing function for resizing both voice and images. It’s a wrapper around the TensorFlow function tf.keras.layers.Resizing.

This function accepts either 4D tensors (batch size, height, width, channels) or 3D tensors (height, width, channels) as input.

Let me know if this helps!

Thank You!!