1. A motor control apparatus for controlling a motor, the motor control apparatus comprising: a motor control unit comprising a magnetic flux controller and a magnetic flux estimator; a machine learning apparatus configured to learn a gain of the magnetic flux controller and a time constant of the magnetic flux estimator, the machine learning apparatus comprising: a state observation unit configured to observe a state variable defined by at least one of data relating to an acceleration of the motor, data relating to a jerk of the motor, and data relating to an acceleration time of the motor; and a learning unit configured to learn the gain of the magnetic flux controller and the time constant of the magnetic flux estimator in accordance with a training data set defined by the state variable; and a decision-making unit configured to determine the gain of the magnetic flux controller and the time constant of the magnetic flux estimator based on a result of learning by the learning unit, wherein the motor control unit is configured to, in response to an input speed command, control a current of the motor based on the gain and the time constant determined by the decision-making unit.