Natural Language Processing · free preview

Feedforward Networks of Neural Units

Units with nonlinear activations, the XOR argument for hidden layers, the layer-by-layer equations, and embeddings pooled as network input.

1. Feedforward Networks of Neural Units

Feedforward Networks of Neural Units

2. Hidden layers learn representations

Hidden layers learn representations

3. Forward passes in NumPy

Forward passes in NumPy

4. A unit with ReLU

A unit has weights w=[1,0.5,−1]\mathbf{w} = [1, 0.5, -1], input x=[2,3,3]\mathbf{x} = [2, 3, 3] and bias b=−1b = -1. Compute its ReLU activation, max⁡(w⋅x+b,0)\max(\mathbf{w} \cdot \mathbf{x} + b, 0), as a decimal.

5. Choosing an activation

Which pairing of activation property and consequence is correct?

6. What if layers were linear?

Suppose every activation in a 5-layer network were replaced by the identity, leaving pure linear layers. What function class can the resulting network compute?

7. The fold that solves XOR

In a two-unit ReLU hidden layer, the inputs [0,1][0, 1] and [1,0][1, 0] both produce the hidden vector [0,0][0, 0], while [0,0][0, 0] produces [0,1][0, 1] and [1,1][1, 1] produces [1,0][1, 0]. In this hidden space, are the XOR-positive points and the XOR-negative points linearly separable? Answer yes or no.

8. Shapes through a 2-layer network

A classifier has input dimension n0=6n_0 = 6, n1=3n_1 = 3 hidden units with ReLU, and n2=4n_2 = 4 output classes with softmax. How many rows does the first weight matrix W\mathbf{{W}} have? Answer with the number.

Practice this interactively

Free account · instant grading · spaced review that schedules itself.

Start this course for free