From 4945c660000dccbdf6b912eadb09ed46c9498aef Mon Sep 17 00:00:00 2001 From: Oceania2018 Date: Sat, 31 Oct 2020 09:30:22 -0500 Subject: [PATCH] fix unit test. --- test/TensorFlowNET.UnitTest/Keras/LayersTest.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/TensorFlowNET.UnitTest/Keras/LayersTest.cs b/test/TensorFlowNET.UnitTest/Keras/LayersTest.cs index a37f0fd9..d5ed8cd7 100644 --- a/test/TensorFlowNET.UnitTest/Keras/LayersTest.cs +++ b/test/TensorFlowNET.UnitTest/Keras/LayersTest.cs @@ -30,10 +30,10 @@ namespace TensorFlowNET.UnitTest.Keras var inputs = keras.Input(shape: 784); Assert.AreEqual((None, 784), inputs.TensorShape); - var dense = layers.Dense(64, activation: "relu"); + var dense = layers.Dense(64, activation: tf.keras.activations.Relu); var x = dense.Apply(inputs); - x = layers.Dense(64, activation: "relu").Apply(x); + x = layers.Dense(64, activation: tf.keras.activations.Relu).Apply(x); var outputs = layers.Dense(10).Apply(x); var model = keras.Model(inputs, outputs, name: "mnist_model"); @@ -75,7 +75,7 @@ namespace TensorFlowNET.UnitTest.Keras // Create a `Sequential` model and add a Dense layer as the first layer. var model = tf.keras.Sequential(); model.add(tf.keras.Input(shape: 16)); - model.add(tf.keras.layers.Dense(32, activation: "relu")); + model.add(tf.keras.layers.Dense(32, activation: tf.keras.activations.Relu)); // Now the model will take as input arrays of shape (None, 16) // and output arrays of shape (None, 32). // Note that after the first layer, you don't need to specify