Browse Source

fix unit test.

tags/v0.30
Oceania2018 5 years ago
parent
commit
4945c66000
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      test/TensorFlowNET.UnitTest/Keras/LayersTest.cs

+ 3
- 3
test/TensorFlowNET.UnitTest/Keras/LayersTest.cs View File

@@ -30,10 +30,10 @@ namespace TensorFlowNET.UnitTest.Keras
var inputs = keras.Input(shape: 784); var inputs = keras.Input(shape: 784);
Assert.AreEqual((None, 784), inputs.TensorShape); 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); 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 outputs = layers.Dense(10).Apply(x);


var model = keras.Model(inputs, outputs, name: "mnist_model"); 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. // Create a `Sequential` model and add a Dense layer as the first layer.
var model = tf.keras.Sequential(); var model = tf.keras.Sequential();
model.add(tf.keras.Input(shape: 16)); 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) // Now the model will take as input arrays of shape (None, 16)
// and output arrays of shape (None, 32). // and output arrays of shape (None, 32).
// Note that after the first layer, you don't need to specify // Note that after the first layer, you don't need to specify


Loading…
Cancel
Save