You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to use layer_norm or LayerNormalization with tf.keras #782
I know this is old, but are there any examples of actually using this? I can't add it to a Sequential Model since Sequential.Add() expects an object derived from BaseLayer and not Tensorflow.Keras.Layer.
Activity
Oceania2018 commentedon Apr 24, 2021
Added to do list.
https://www.tensorflow.org/api_docs/python/tf/keras/layers/LayerNormalization
lindadamama commentedon Nov 11, 2021
missing layerNormalization
However, Torchsharp's APIS are complete
https://github.com/tensorflow/tensorflow/tree/v2.7.0/tensorflow/python/keras/layers/normalization
https://github.com/dotnet/TorchSharp/tree/main/src/TorchSharp/NN/Normalization
Oceania2018 commentedon Nov 11, 2021
@lindadamama It's been already implemented, here is an example: https://github.com/SciSharp/SciSharp-Stack-Examples/blob/83668294eda65e5bc73c6d7d6276c1fa5057a88a/src/TensorFlowNET.Examples/GAN/MnistGAN.cs#L70
lindadamama commentedon Nov 11, 2021
Shouldn't BatchNormalization and LayerNormalization be two different methods?
Oceania2018 commentedon Nov 11, 2021
@lindadamama Sorry, my mistake. I will add this task in to-do-list.
https://keras.io/api/layers/normalization_layers/layer_normalization/
Wanglongzhi2001 commentedon Nov 13, 2023
Close Due to layernormalization has been developed, please reopen if you still have question, thanks!
MattCW1701 commentedon Feb 25, 2025
I know this is old, but are there any examples of actually using this? I can't add it to a Sequential Model since Sequential.Add() expects an object derived from BaseLayer and not Tensorflow.Keras.Layer.