Question: Problem 1 ( 1 , 0 ) : Build an MLP network with 8 neurons in the first hidden layer, 4 neurons each in the

Problem 1(1,0) : Build an MLP network with 8 neurons in the first hidden layer, 4 neurons each in the second and third hidden layers. Use 6 neurons for the output layer. All the hidden layer neurons use ReLU activation function. The output layer neurons use softmax activation function. The network should be compiled using Adam optimizer, categorical_crossentropy loss function and accuracy as a metric.
In
In []:
def build_nn():
return:
model: A compiled keras model with the attributes provid
ed in the question
# Don't modify
model = keras. Sequential ()
## BEGIN SOLUTION
return model
Problem 2(1) Train the compiled network in problem 1 in 10 epochs, with a batch size of 32. Use the encoded training set for training (utilize Helper function 2).
In []: def train_model(model, encoded_train):
,',
parameters:
model: A compiled keras model with the attributes provid ed in the problem 2
encoded_train: The training dataset with 8 columns. The first 6 columns represent the one-hot-encoded region where the p oint belongs.
The last 2 columns represent the (x,y)c o-ordinate of the point.
return:
model: A trained keras model with the provided settings in the question
X_train: The encoded training x
y_train: The encoded training y
### BEGIN SOLUTION
# Uncomment and complete the lines below
# X_train =
#y-train =
# Train the model below. Use X_train, y_train to train the m odel with the given settings in the question.
# return model, x_train, y_train
Problem 1 ( 1 , 0 ) : Build an MLP network with 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!