With the spread of smartphones incorporating various sensors, accelerometers and gyro sensors have become familiar to us. Based on such situations, sensor-based human activity recognition (HAR) that uses human sensor data to identify human activity has come to use smartphones as data acquisition sources. In the early studies of HAR using smartphones, handcrafted methods were used if various statistical values were required as feature quantities and high accuracy was realized. Meanwhile, the popularization of deep learning in recent years has not been discussed, and its application has been made to HAR. Although deep learning has the advantage of being able to automatically extract feature quantities from data, it has not reached a step beyond precision in handcrafted methods. Furthermore, in the previous research, to divide data by time window of a fixed interval, except for some part, inference could not be performed unless the data for the time window was secured. We attempted to overcome these limitations using recurrent neural network. Our method records higher accuracy than previous studies using convolutional neural network and long short term memory, which are typical methods in deep learning and display results comparable to handcrafted methods. We also succeeded in pre-calculating many feature quantities, whose calculation was a problem in the previous research, and eliminating the time window.