This paper concentrates on the problem of associating an intelligent reflecting surface (IRS) to multiple users in a multiple-input single-output (MISO) downlink wireless communication network. The main objective of the paper is to maximize the sum-rate of all users by solving the joint optimization problem of the IRS-user association, IRS reflection, and BS beamforming, formulated as a non-convex mixed-integer optimization problem. The variable separation and relaxation are used to transform the problem into three convex sub-problems, which are alternatively solved through the convex optimization (CO) method. The major drawback of the proposed CO-based algorithm is high computational complexity. Thus, we make use of machine learning (ML) to tackle this problem. To this end, first, we convert the optimization problem into a regression problem. Then, we solve it with feed-forward neural networks (FNNs), trained by CO-based generated data. Simulation results show that the proposed ML-based algorithm has a performance equivalent to the CO-based algorithm, but with less computation complexity due to its offline training procedure.