Question: Computes the forward pass for an affine ( fully - connected ) layer. The input x has shape ( N , d _ 1 ,

Computes the forward pass for an affine (fully-connected) layer.
The input x has shape (N, d_1,..., d_k) and contains a minibatch of N
examples, where each example x[i] has shape (d_1,..., d_k). We will
reshape each input into a vector of dimension D = d_1*...* d_k, and
then transform it to an output vector of dimension M.
Inputs:
- x: A numpy array containing input data, of shape (N, d_1,..., d_k)
- w: A numpy array of weights, of shape (D, M)
- b: A numpy array of biases, of shape (M,)
Returns a tuple of:
- out: output, of shape (N, M)
- cache: (x, w, b)

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!