import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers # Define Sequential model with 3 layers model = keras.Sequential([ layers.Dense( 2 , activation ="relu", name ="layer1"), layers.Dense( 3 , activation ="relu", name ="layer2"), layers.Dense( 4 , name ="layer3"), ]) # Call model on a test input x = tf .ones(( 3 , 3 )) y = model ( x ) # Create 3 layers layer1 = layers.Dense( 2 , activation ="relu", name ="layer1") layer2 = layers.Dense( 3 , activation ="relu", name ="layer2") layer3 = layers.Dense( 4 , name ="layer3") # Call layers on a test input x = tf .ones(( 3 , 3 )) y = layer3 ( layer2 ( layer1 ( x ))) model = keras.Sequential( [ layers.Dense( 2 , activation =&...
hmm
ReplyDelete