TensorFlow & keras 3
Q1. Functional model Complete the code snippet in order to get the following model summary. from tensorflow.keras.layers import Dense, Flatten, Input from tensorflow.keras.models import Model def create_model_functional(): inp = Input(shape=(28, )) h1 = Dense(64, activation="relu", name="hidden_1")(inp) h2 = Dense( _a_ , activation="relu", name="hidden_2")(h1) out = Dense(4, activation="softmax", name="output")( _b_ ) model = Model(inputs=inp, outputs=out, name="simple_nn") return model model_functional = create_model_functional() model_functional.summary() Choose the correct answer from below: A. 512, b - h2 B. 64, b - h2 C. 10, b - h1 D. 512, b – inp Ans: A Correct Option: a- 512, b - h2 Explanation: To get the model summary as shown in the question, the value of a should be 512 and the value of b should be h2. This will create a neur