In this paper, machine-learning-based tools are utilized to learn a model of the functionality of a commercial chip with built-in signal processing and sensor fusion algorithms. Specifically, a fully integrated 9-axis Inertial Measurement Unit (IMU) with embedded algorithms providing the three-axis attitude and corresponding quaternion by fusing all the sensors is considered. Traditionally, extended Kalman filters are used for fusing IMU sensors; however, subtle algorithmic fixes (e.g., magnetic and angular alignment calibration for all sensors, Kalman filter tuning, temperature drift compensation, dynamic magnetic effects) need to be deployed to attain precise attitude (especially heading). A recurrent neural network (RNN) was trained using the chip to substitute for the built-in algorithms of the IMU Chip to output the approximate attitude given the 9-axis sensor data. We show the efficacy of our approach by mounting two IMUs on a board and utilize one IMU, which has its own internal algorithms, to train a machine learning system to fuse the raw data from the sensors on the second IMU to generate comparable accuracy (and in some cases, even outperform the original IMU).