In this study, a learning-based force controller for a hydraulic actuator is presented. We propose a control method with an inverse model composed of a deep neural network, which accurately tracks a force trajectory. This learning-based controller can be trained offline using force and position data sets from the hydraulic actuator. The methodology for training the controller network and the experimental setup for data collection are proposed. The learning-based controller was implemented on a hydraulic actuator hardware platform. The proposed learning-based controller demonstrates improved tracking performance compared to that of conventional model-based adaptive control methods.