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 fullyconnected layer.
The input x has shape N d dk and contains a minibatch of N
examples, where each example xi has shape d dk We will
reshape each input into a vector of dimension D d dk and
then transform it to an output vector of dimension M
Inputs:
x: A numpy array containing input data, of shape N d dk
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
