Fully vectorized NN predict function.