Light scattering control in transmission and reflection with neural networks