DLS Course 2 Week #3 Assignment. Ex.4 - initialize_parameters

Hi dear members of the community!

I am currently working on completing Week #3 Programming Assignment: TensorFlow Introduction (DLS, Course 2 “Improving Deep Neural Networks: Hyperparameter Tuning, Regularization, and Optimization”).

I am stuck on Exercise 4 - initialize_parameters.

I receive the following traceback:


What could be my mistake?

Hi @VeronikaS ,

The problem is in the way you set the shape, which should be a tuple (25, 12288).

Please refer to the instruction:

Exercise 4 - initialize_parameters

Implement the function below to take in a shape and to return an array of numbers using the GlorotNormal initializer.

  • tf.keras.initializers.GlorotNormal(seed=1)
  • tf.Variable(initializer(shape=())

Hi Kic,

thank you for answer. It was helpful!