Development of AI Algorithm for Weight Training Using Inertial Measurement Units