Closed JustDooooIt closed 10 months ago
Writing keras.layers.LayerNormalization inside the Model class will report an error
[TestMethod] public void Model1Test() { var model = new TestModel1(); var tensor = np.random.random((7, 7, 8, 13)); model.Apply(tensor); } public class TestModel1 : Model { ILayer conv2d; ILayer norm; public TestModel1() : base(new()) { conv2d = tf.keras.layers.Conv2D(16, 3, 1, "same"); norm = tf.keras.layers.LayerNormalization(-1); } protected override Tensors Call(Tensors inputs, Tensors state = null, bool? training = null, IOptionalArgs optional_args = null) { var x = conv2d.Apply(inputs); x = norm.Apply(x); return x; } }
No response
TestModel1 should inherit Layer
Layer
Description
Writing keras.layers.LayerNormalization inside the Model class will report an error
Reproduction Steps
Known Workarounds
No response
Configuration and Other Information
No response