Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a Exercise 1 (10 points) The weights of a neural network are randomly initialized at the beginning of training. There are different ways to initialize

image text in transcribed

a Exercise 1 (10 points) The weights of a neural network are randomly initialized at the beginning of training. There are different ways to initialize weights. One popular method is called GlorotUniform and it initializes a weight matrix of shape (Nin, Nout) by sampling from a uniform distribution over [-1,7 where 6 nin +nout Implement a function that takes integers n_in, n out as its arguments and returns a pair W and b where W, the weights, is a matrix of shape (n_in, n_out) sampled from the uniform distribution described above and b, the biases, is a zero matrix of shape (1, n out). Hint: np.random.uniform. Don't worry about the fact that this function samples from a half open interval. [ ] def initialize_weights_and_biases(n_in, n out): Initializes the weights and biases Arguments: n_in: int, number of input units nout: int, number of output units Returns: W: The weights, a numpy array of shape (n in, n_out) b: The biases, a numpy array of shape (1, n out) np.random.seed(seed = 1) ########## Your Code goes here ############## ############################################ BB return W, b project_2_tests.test_initialize_weights_and_biases (initialize weights_and_biases)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions

Question

2. Do you find change a. invigorating? b. stressful? _______

Answered: 1 week ago

Question

How was their resistance overcome?

Answered: 1 week ago