Registrations Closing Soon for DevOps Certification Training by CloudxLab | Registrations Closing in

  Enroll Now

Building the Network

We shall now build the classification network, with a hidden layer(with 30 neurons and selu activation function) and an output layer( with 1 neuron since we have to predict only one value).

We shall also specify the loss function we have defined - the huber_fn and the optimizer to use, while compiling.


  • kernel_initializer defines the way to set the initial random weights of Keras layers.
  • Set "selu" as the activation and "lecun_normal" as the kernel_initializer for the following model.

    model = keras.models.Sequential([
        keras.layers.Dense(30, activation=<< your code comes here >>, 
           kernel_initializer=<< your code comes here >>, 
  • Compile the model using compile.

    • Set loss to be huber_fn which is the custom loss function we defined

    • We will be using "nadam" optimizer and "mae" metric.

      model.<< your code comes here >>(loss=<< your code comes here >>, optimizer="nadam", metrics=["mae"])

No hints are availble for this assesment

Answer is not availble for this assesment

Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...