Building a feedforward network