CS 5043: HW5: Tensor Flow

Assignment notes:

Background

The benefit to having one or more hidden layers in a neural network is that one can express very complicated continuous functions, whereas networks with no hidden layers are limited in the types of functions that they can represent. However, one of the challenges in adding hidden layers to networks is that, early in the training process, it can be difficult to overcome the vanishing gradient problem. One way to address this challenge, in part, is to break the serial nature of the layers. In other words, we can allow a single layer to receive input from more than one prior layer. For example, in a network containing one hidden layer, this layer will receive inputs from the input layer, but the output layer will receive inputs from both the hidden and input layers. If the output layer is a linear transformation, then the effective implementation is a linear function with a bit of non-linearity that can be recruited, as necessary.


Part 1a: Multi-Input Layers

The book presents an approach to constructing multi-layer networks in "raw" Tensorflow (p. 266-). Expand the neuron_layer() implementation to take as input two different input layers (or, if you are ambitious, an arbitrary number of input layers):

Create a network building function that uses the new neuron_layer() to construct either a traditional 1-hidden layer network, or a modified one in which the output layer receives two inputs.

Experiments

Hints


Part 1b: Multiple Hidden Layers

Perform a similar analysis as above using 2 hidden layers.


Part 2: Regularization

With the introduction of weight regularization in Ridge Regression, we gained a lot in performance by adding a regularization term to the cost function. Modify your above network implementation so as to include a weight regularization term.

Experiments


Hints


andrewhfagg -- gmail.com

Last modified: Mon Mar 12 22:24:26 2018