4.3 Forward Propagation

In [13]:
def shallowLayerNetwork(X, weights, biases):
    
    # First layer
    layer_1 = tf.add(tf.matmul(X, weights['w1']), biases['b1'])
    layer_1 = tf.nn.relu(layer_1)
    
    # output layer. We need to have a linear output instead of a non-linear output
    output_layer = tf.add(tf.matmul(layer_1, weights['w2']), biases['b2'])
    
    return output_layer