rfho/models.py
def create_or_reuse(init_or_variable, shape, name='var'):
    """
    Creates a variable given a shape or does nothing if `init_or_variable` is already a Variable.

    :param init_or_variable:
    :param shape:
    :param name:
    :return:
    """
    return init_or_variable if isinstance(init_or_variable, tf.Variable) \
        else tf.Variable(init_or_variable(shape), name=name)

    Creates a variable given a shape or does nothing if `init_or_variable` is already a Variable.

    :param init_or_variable:
    :param shape:
    :param name:
    :return:
    
Creates a variable given a shape or does nothing if `init_or_variable` is already a Variable.
Creates a variable given a shape or does nothing if ` init_or_variable ` is already a Variable .
def create_or_reuse(init_or_variable, shape, name='var'):
    return init_or_variable if isinstance(init_or_variable, tf.Variable) \
        else tf.Variable(init_or_variable(shape), name=name)
def create_or_reuse ( init_or_variable , shape , name = 'var' ) : return init_or_variable if isinstance ( init_or_variable , tf . Variable ) else tf . Variable ( init_or_variable ( shape ) , name = name )
Creates a variable given a shape or does nothing if `init_or_variable` is already a Variable.
Creates a variable given a shape or does nothing if ` init_or_variable ` is already a Variable .
"""
    Creates a variable given a shape or does nothing if `init_or_variable` is already a Variable.

    :param init_or_variable:
    :param shape:
    :param name:
    :return:
    """
None
init_or_variable
None
shape
None
name
None