|
|
|
@@ -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 |
|
|
|
|