def feedforward(input, layers):
	"""Compute and return the forward activation of each layer in layers."""
	activations = [input] 
	X = input
	for layer in layers:
		Y = layer.forward(X)  #feed the input into the layer
		activations.append(Y) 
		X = Y  #use the current output as the input for the next layer 
	return activations