tools/autograd/gen_variable_type.py
def find_args_with_derivatives():
        """Find arguments that have derivative definitions"""
        if func is None:
            return differentiable_inputs
        names = set(name for d in func['derivatives'] for name in d['var_names'])
        differentiable = [arg for arg in differentiable_inputs if arg['name'] in names]
        if len(differentiable) != len(names):
            missing = names - set(arg['name'] for arg in differentiable)
            raise RuntimeError('Missing arguments for derivatives: {} in {}'.format(missing, func['name']))
        return differentiable
Find arguments that have derivative definitions
Find arguments that have derivative definitions
Find arguments that have derivative definitions
def find_args_with_derivatives():
        if func is None:
            return differentiable_inputs
        names = set(name for d in func['derivatives'] for name in d['var_names'])
        differentiable = [arg for arg in differentiable_inputs if arg['name'] in names]
        if len(differentiable) != len(names):
            missing = names - set(arg['name'] for arg in differentiable)
            raise RuntimeError('Missing arguments for derivatives: {} in {}'.format(missing, func['name']))
        return differentiable
def find_args_with_derivatives ( ) : if func is None : return differentiable_inputs names = set ( name for d in func [ 'derivatives' ] for name in d [ 'var_names' ] ) differentiable = [ arg for arg in differentiable_inputs if arg [ 'name' ] in names ] if len ( differentiable ) != len ( names ) : missing = names - set ( arg [ 'name' ] for arg in differentiable ) raise RuntimeError ( 'Missing arguments for derivatives: {} in {}' . format ( missing , func [ 'name' ] ) ) return differentiable
Find arguments that have derivative definitions
Find arguments that have derivative definitions
"""Find arguments that have derivative definitions"""