@@ -30,10 +30,10 @@ public void Functional()
3030 var inputs = keras . Input ( shape : 784 ) ;
3131 Assert . AreEqual ( ( None , 784 ) , inputs . TensorShape ) ;
3232
33- var dense = layers . Dense ( 64 , activation : "relu" ) ;
33+ var dense = layers . Dense ( 64 , activation : tf . keras . activations . Relu ) ;
3434 var x = dense . Apply ( inputs ) ;
3535
36- x = layers . Dense ( 64 , activation : "relu" ) . Apply ( x ) ;
36+ x = layers . Dense ( 64 , activation : tf . keras . activations . Relu ) . Apply ( x ) ;
3737 var outputs = layers . Dense ( 10 ) . Apply ( x ) ;
3838
3939 var model = keras . Model ( inputs , outputs , name : "mnist_model" ) ;
@@ -75,7 +75,7 @@ public void Dense()
7575 // Create a `Sequential` model and add a Dense layer as the first layer.
7676 var model = tf . keras . Sequential ( ) ;
7777 model . add ( tf . keras . Input ( shape : 16 ) ) ;
78- model . add ( tf . keras . layers . Dense ( 32 , activation : "relu" ) ) ;
78+ model . add ( tf . keras . layers . Dense ( 32 , activation : tf . keras . activations . Relu ) ) ;
7979 // Now the model will take as input arrays of shape (None, 16)
8080 // and output arrays of shape (None, 32).
8181 // Note that after the first layer, you don't need to specify
0 commit comments