Implement random initialization and forward propagation