import tensorflow as tf

    """
    Function that applies a affine transformation
    in the input tensor using the variables
    from the dict layer.

    :type input_tensor: tf tensor
    :type layer: dictionary
    :rtype: tf tensor
    """
    return tf.add(tf.matmul(input_tensor, layer['weights']),
                  layer['bias'])
