(x_tokens)
return int(avg_tokens + 2 * np.std(num_tokens))
Feature length is used for padding/ truncating (ensuring
    that each sequence is of the same length in batch).
    Max tokens set to avg + 2 std dev.

    Args:
        x_tokens: List of sequences.

    Returns:
        Max feature length (max tokens).
Feature length is used for padding/ truncating (ensuring
    that each sequence is of the same length in batch).
    Max tokens set to avg + 2 std dev.
Feature length is used for padding / truncating ( ensuring that each sequence is of the same length in batch ) . Max tokens set to avg + 2 std dev .
def get_feature_length(x_tokens):
    """
    Feature length is used for padding/ truncating (ensuring
    that each sequence is of the same length in batch).
    Max tokens set to avg + 2 std dev.

    Args:
        x_tokens: List of sequences.

    Returns:
        Max feature length (max tokens).
    """
    num_tokens = np.array([len(tokens) for tokens in x_tokens])
    avg_tokens = np.mean(num_tokens)
    return int(avg_tokens + 2 * np.std(num_tokens))
def get_feature_length ( x_tokens ) : num_tokens = np . array ( [ len ( tokens ) for tokens in x_tokens ] ) avg_tokens = np . mean ( num_tokens ) return int ( avg_tokens + 2 * np . std ( num_tokens ) )