residual Network constructor