'Compose this layer with the inputs provided'

def __call__(self, *args, **kwargs):

    if (('one_step' in kwargs) and kwargs['one_step']):
        del kwargs['one_step']
        args = [self.tensor_from_layer(arg, False) for arg in args]
        kwargs = dict([(k, self.tensor_from_layer(v, False)) for (k, v) in kwargs.items()])
        if hasattr(self, 'step_fprop'):
            return self.step_fprop(*args, **kwargs)
        else:
            return self.fprop(*args, **kwargs)
    new_obj = utils.copy(self)
    args = [new_obj.tensor_from_layer(arg) for arg in args]
    kwargs = dict([(k, new_obj.tensor_from_layer(v)) for (k, v) in kwargs.items()])
    if ('do' in kwargs):
        kind = kwargs['do']
        del kwargs['do']
    else:
        kind = 'fprop'
    if ('one_step' in kwargs):
        del kwargs['one_step']
    new_obj.prev_args = (args, kwargs)
    if (kind == 'fprop'):
        new_obj.fprop(*args, **kwargs)
    elif (kind == 'eval'):
        new_obj.get_cost(*args, **kwargs)
    elif (kind == 'train'):
        new_obj.get_grads(*args, **kwargs)
    elif (kind == 'run'):
        return new_obj.run(*args, **kwargs)
    return new_obj
