(self, inputs=None, h=None)
inputs: [batch_size, seq_len]
        h: [num_layers, batch_size, hidden_size] (RNN/GRU)
        h_c: [2, num_layers, batch_size, hidden_size] (LSTM)
inputs: [batch_size, seq_len]
        h: [num_layers, batch_size, hidden_size] (RNN/GRU)
        h_c: [2, num_layers, batch_size, hidden_size] (LSTM)
inputs : [ batch_size seq_len ] h : [ num_layers batch_size hidden_size ] ( RNN / GRU ) h_c : [ 2 num_layers batch_size hidden_size ] ( LSTM )
def batch_size(self, inputs=None, h=None):
        """
        inputs: [batch_size, seq_len]
        h: [num_layers, batch_size, hidden_size] (RNN/GRU)
        h_c: [2, num_layers, batch_size, hidden_size] (LSTM)
        """
        if inputs is not None:
            batch_size = inputs.size(0)
            return batch_size

        else:
            if self.use_lstm:
                batch_size = h[0].size(1)
            else:
                batch_size = h.size(1)
            return batch_size
def batch_size ( self , inputs = None , h = None ) : if inputs is not None : batch_size = inputs . size ( 0 ) return batch_size else : if self . use_lstm : batch_size = h [ 0 ] . size ( 1 ) else : batch_size = h . size ( 1 ) return batch_size