converting weights from numpy.ndarray to numpy.matrix
migrated network builder to use layer objects to make forward pass easier to code