parameters: (voc_size, max_len, dropout=0.5)
return_statement: return model
docstring: Two siamese branches, each embedding a statement.
  
    Binary classifier on top.
  
    Args:
      voc_size: size of the vocabulary for the input statements.
      max_len: maximum length for the input statements.
      dropout: Fraction of units to drop.
    Returns:
      A Keras model instance.
docstring_summary: Two siamese branches, each embedding a statement.
docstring_tokens: Two siamese branches each embedding a statement .
function: def embedding_logreg_siamese(voc_size, max_len, dropout=0.5):
    """Two siamese branches, each embedding a statement.
  
    Binary classifier on top.
  
    Args:
      voc_size: size of the vocabulary for the input statements.
      max_len: maximum length for the input statements.
      dropout: Fraction of units to drop.
    Returns:
      A Keras model instance.
    """
    pivot_input = layers.Input(shape=(max_len,), dtype='int32')
    statement_input = layers.Input(shape=(max_len,), dtype='int32')
  
    x = layers.Embedding(
        output_dim=256,
        input_dim=voc_size,
        input_length=max_len)(pivot_input)
    x = layers.Activation('relu')(x)
    embedded_pivot = layers.Flatten()(x)
  
    encoder_model = Model(pivot_input, embedded_pivot)
    embedded_statement = encoder_model(statement_input)
  
    concat = layers.merge([embedded_pivot, embedded_statement], mode='concat')
    x = layers.Dropout(dropout)(concat)
    prediction = layers.Dense(1, activation='sigmoid')(x)
  
    model = Model([pivot_input, statement_input], prediction)
    return model
function_tokens: def embedding_logreg_siamese ( voc_size , max_len , dropout = 0.5 ) : pivot_input = layers . Input ( shape = ( max_len , ) , dtype = 'int32' ) statement_input = layers . Input ( shape = ( max_len , ) , dtype = 'int32' ) x = layers . Embedding ( output_dim = 256 , input_dim = voc_size , input_length = max_len ) ( pivot_input ) x = layers . Activation ( 'relu' ) ( x ) embedded_pivot = layers . Flatten ( ) ( x ) encoder_model = Model ( pivot_input , embedded_pivot ) embedded_statement = encoder_model ( statement_input ) concat = layers . merge ( [ embedded_pivot , embedded_statement ] , mode = 'concat' ) x = layers . Dropout ( dropout ) ( concat ) prediction = layers . Dense ( 1 , activation = 'sigmoid' ) ( x ) model = Model ( [ pivot_input , statement_input ] , prediction ) return model