Gender classification by computer is essential for applications in many domains, such as human-computer interaction or biometric system applications. Generally, gender classification by computer can be done by using a face photo, fingerprint, or voice. However, researchers have demonstrated the potential of the electrocardiogram (ECG) as a biometric recognition and gender classification. In facilitating the process of gender classification based on ECG signals, a method is needed, namely Long Short-Term Memory (LSTM) and Bidirectional Long Short-Term Memory (Bi-LSTM). Researchers use these two methods because of the ability of these two methods to deal with sequential problems such as ECG signals. The inputs used in both methods generally use one-dimensional data with a generally large number of signal features. The dataset used in this study has a total of 10,000 features. This research was conducted on changing the input shape to determine its effect on classification performance in the LSTM and Bi-LSTM methods. Each method will be tested with input with 11 different shapes. The best accuracy results obtained are 79.03% with an input shape size of 100×100 in the LSTM method. Moreover, the best accuracy in the Bi-LSTM method with input shapes of 250×40 is 74.19%. The main contribution of this study is to share the impact of various input shape sizes to enhance the performance of gender classification based on ECG signals using LSTM and Bi-LSTM methods. Additionally, this study contributes for selecting an appropriate method between LSTM and Bi-LSTM on ECG signals for gender classification