Question: Problem 1 ( 1 , 0 ) : Build an MLP network with 8 neurons in the first hidden layer, 4 neurons each in the
Problem : Build an MLP network with neurons in the first hidden layer, neurons each in the second and third hidden layers. Use 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, categoricalcrossentropy loss function and accuracy as a metric.
In
In :
def buildnn:
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 Train the compiled network in problem in epochs, with a batch size of Use the encoded training set for training utilize Helper function
In : def trainmodelmodel encodedtrain:
parameters:
model: A compiled keras model with the attributes provid ed in the problem
encodedtrain: The training dataset with columns. The first columns represent the onehotencoded region where the oint belongs.
The last columns represent the oordinate of the point.
return:
model: A trained keras model with the provided settings in the question
Xtrain: The encoded training
ytrain: The encoded training
### BEGIN SOLUTION
# Uncomment and complete the lines below
# Xtrain
#train
# Train the model below. Use Xtrain, ytrain to train the odel with the given settings in the question.
# return model, xtrain, ytrain
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
