Module Import alias identifier Import alias Import alias ImportFrom alias ImportFrom alias ClassDef bases body FunctionDef arguments args NameParam defaults body Return BinOpDiv Num BinOpAdd Num Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return BinOpDiv Num BinOpAdd Num Call AttributeLoad NameLoad attr UnaryOpUSub NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Return BinOpDiv BinOpSub Call AttributeLoad NameLoad attr BinOpMult Num NameLoad Num BinOpAdd Call AttributeLoad NameLoad attr BinOpMult Num NameLoad Num decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index NameLoad Num Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad attr NameLoad decorator_list NameLoad decorator_list ClassDef bases body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore Num Assign NameStore Num If CompareIn Str NameLoad body Assign NameStore Num If CompareIn Str NameLoad body Assign NameStore Num If CompareIn Str NameLoad body If CompareIn Str NameLoad body Assign NameStore BinOpAdd Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num keyword TupleLoad NameLoad NameLoad attr NameLoad Num orelse Assign NameStore BinOpSub Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num keyword TupleLoad NameLoad NameLoad attr NameLoad Num orelse If CompareIn Str NameLoad body Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Num orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign SubscriptStore NameLoad Index CompareGt NameLoad Num Num Assign SubscriptStore NameLoad Index CompareLt NameLoad Num Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Num For NameStore NameLoad body Exec BinOpMod Str NameLoad Call NameLoad Call NameLoad AugAssignAdd NameStore Num Assign NameStore NameLoad Exec BinOpAdd Str NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Num Assign NameStore ListLoad For NameStore NameLoad body Exec BinOpMod Str TupleLoad NameLoad NameLoad Exec BinOpMod Str NameLoad AugAssignAdd NameStore Num Assign NameStore NameLoad Exec BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Slice NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad If NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Return ListLoad NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr NameLoad keyword ListLoad Str body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad Ellipsis BinOpAdd NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Ellipsis NameLoad Assign SubscriptStore NameLoad Ellipsis BinOpSub NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Ellipsis NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpDiv BinOpSub NameLoad NameLoad BinOpMult Num AttributeLoad NameLoad attr AugAssignAdd NameStore Num Assign SubscriptStore NameLoad Slice Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return ListLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad body FunctionDef arguments args NameParam defaults body Assign NameStore Str AugAssignAdd NameStore BinOpAdd BinOpMod Str TupleLoad NameLoad Str AugAssignAdd NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Num Index BinOpSub NameLoad Num AugAssignAdd NameStore BinOpAdd Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Num Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad SubscriptLoad NameLoad Index Num attr Assert Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Num attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body AugAssignAdd NameStore Num If UnaryOpNot Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad body Raise Call NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assert CompareEq AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Num Assert CompareEq AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr TupleLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad Num Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign NameStore BinOpDiv Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Num Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad NameLoad keyword Num keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore Call NameLoad Num Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore Call NameLoad Num Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad keyword Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword Str keyword AttributeLoad NameLoad attr Assign NameStore BinOpAdd BinOpSub BinOpAdd BinOpSub BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad BinOpMult BinOpMult NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr BinOpMult Call AttributeLoad NameLoad attr TupleLoad Num Num Num keyword AttributeLoad NameLoad attr Assert Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr ListLoad NameLoad Index Num Call AttributeLoad NameLoad attr keyword Num Assert Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr ListLoad NameLoad Index Num Call AttributeLoad NameLoad attr keyword Num Assert Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr ListLoad NameLoad Index Num Call AttributeLoad NameLoad attr keyword Num Assert Call AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad NameLoad attr ListLoad NameLoad Index Num Call AttributeLoad NameLoad attr keyword Num decorator_list decorator_list Call AttributeLoad AttributeLoad NameLoad attr attr Str
N/A N/A numpy np N/A pprint N/A pytest neon NervanaObject neon.backends.autodiff Autodiff CustomFunc N/A N/A sig N/A N/A x N/A N/A N/A N/A 1.0 N/A 1.0 N/A N/A np exp N/A x N/A staticmethod sig2 N/A N/A x N/A N/A N/A N/A 1.0 N/A 1.0 N/A N/A np exp2 N/A x N/A staticmethod tanh2 N/A N/A x N/A N/A N/A N/A N/A N/A N/A np exp2 N/A 2.0 x 1.0 N/A N/A N/A np exp2 N/A 2.0 x 1.0 N/A staticmethod argmax N/A N/A x axis keepdims N/A 1 True N/A N/A 
        calls numpy argmax with keepdims
         N/A new_shape N/A list N/A x shape N/A N/A new_shape N/A axis 1 N/A new_shape N/A tuple new_shape N/A N/A N/A N/A N/A np argmax x axis axis reshape new_shape N/A staticmethod argmin N/A N/A x axis keepdims N/A 1 True N/A N/A 
        calls numpy argmin with keepdims
         N/A new_shape N/A list N/A x shape N/A N/A new_shape N/A axis 1 N/A new_shape N/A tuple new_shape N/A N/A N/A N/A N/A np argmin x axis axis reshape new_shape N/A staticmethod N/A TestAutodiff N/A N/A setup N/A N/A self N/A N/A N/A N/A self m 2 N/A N/A self n 2 N/A N/A self be N/A NervanaObject be N/A N/A self dtype N/A N/A self be default_dtype N/A N/A self test_epoch 1 N/A N/A self delta 1e-05 N/A _rand_gen N/A N/A self N/A flags N/A N/A 
        flags: 'int', 'pos', 'scalar', 'row', 'col'
         N/A val None N/A m N/A self m N/A n N/A self n N/A N/A scalar flags N/A N/A m 1.0 N/A n 1.0 N/A N/A row flags N/A N/A m 1.0 N/A N/A col flags N/A N/A n 1.0 N/A N/A int flags N/A N/A N/A pos flags N/A N/A val N/A N/A N/A N/A N/A N/A np random randint 5.0 size N/A m n astype float 1.0 N/A N/A val N/A N/A N/A N/A N/A N/A np random randint 5.0 size N/A m n astype float 2.0 N/A N/A N/A pos flags N/A N/A val N/A N/A N/A np absolute N/A N/A N/A np random randn m n 0.1 N/A N/A val N/A N/A N/A np random randn m n N/A N/A val N/A N/A val 5.0 5.0 N/A N/A val N/A N/A val -5.0 -5.0 N/A val N/A _numpy_call N/A N/A f_str tensors N/A N/A N/A 
        evaluate function f from f_str and tensros

        f_str: name of varialbe in the form of x0 - xn
        tensors: numpy tensor vals
         N/A f_str N/A N/A f_str replace be np N/A f_str N/A N/A f_str replace np.sig CustomFunc.sig N/A f_str N/A N/A f_str replace np.sig2 CustomFunc.sig2 N/A f_str N/A N/A f_str replace np.tanh2 CustomFunc.tanh2 N/A f_str N/A N/A f_str replace np.argmax CustomFunc.argmax N/A f_str N/A N/A f_str replace np.argmin CustomFunc.argmin N/A f_str N/A N/A f_str replace axis=0 axis=0, keepdims=True N/A f_str N/A N/A f_str replace axis=1 axis=1, keepdims=True N/A count 0 N/A tensor tensors N/A N/A N/A x%s = tensor count N/A globals N/A locals N/A count 1 N/A result None N/A N/A result =  f_str N/A result N/A staticmethod _get_autodiff_grads_and_val N/A N/A self f_str tensor_vals get_op_tree next_error N/A False None N/A N/A 
        get autodiff grads from optree string expression
        f_str: the string of expression to be executed
        tensors: numpy tensor vals
         N/A be N/A self be N/A count 0 N/A tensors N/A N/A tensor_val tensor_vals N/A N/A N/A x%s = self.be.array(tensor_val, name="x%s", dtype=self.dtype) N/A count count N/A N/A tensors.append(x%s) count N/A count 1 N/A f None N/A N/A f = %s f_str N/A f_val N/A N/A be empty N/A f shape N/A N/A f_val N/A f N/A N/A next_error None N/A N/A next_error N/A N/A N/A self be array next_error N/A ad N/A Autodiff f be next_error next_error N/A get_op_tree N/A N/A gradients N/A list N/A N/A ad get_grad_op_tree tensors N/A N/A gradients N/A list N/A N/A ad get_grad_asnumpyarray tensors N/A N/A gradients N/A N/A f_val get N/A _get_numerical_grads_and_val N/A N/A self f_str tensors next_error N/A None N/A N/A `
        get autodiff grads from numpy string expression
        tensors: numpy tensor vals
         N/A gradients N/A N/A tensor tensors N/A N/A N/A N/A gradients append N/A N/A np zeros N/A tensor shape N/A f_val N/A N/A TestAutodiff _numpy_call f_str tensors N/A N/A next_error None N/A N/A next_error N/A N/A np ones_like f_val N/A N/A tensor gradient N/A zip tensors gradients N/A N/A gradient_flat N/A N/A np copy N/A N/A gradient reshape N/A -1 N/A ind 0 N/A x N/A N/A np nditer tensor op_flags N/A readwrite N/A N/A x_backup N/A N/A np copy x N/A N/A x N/A N/A x N/A self delta N/A f_inc N/A N/A np sum N/A N/A N/A TestAutodiff _numpy_call f_str tensors next_error N/A N/A x N/A x_backup N/A N/A x N/A N/A x N/A self delta N/A f_dec N/A N/A np sum N/A N/A N/A TestAutodiff _numpy_call f_str tensors next_error N/A N/A x N/A x_backup N/A N/A gradient_flat N/A ind N/A N/A f_inc f_dec N/A 2.0 N/A self delta N/A ind 1 N/A N/A gradient N/A N/A N/A gradient_flat reshape N/A gradient shape N/A N/A gradients f_val N/A _assert_grad_equal N/A N/A self f_str tensors rtol atol next_error N/A 0.01 1e-05 None N/A debug_msg N/A N/A count N/A N/A N/A msg N/A msg N/A N/A Error at tensor x%s N/A count N/A msg N/A N/A N/A pprint pformat tensors N/A grad_op_trees N/A N/A self _get_autodiff_grads_and_val f_str tensors get_op_tree True N/A grad_op_tree N/A N/A grad_op_trees N/A 0 N/A N/A count 1 N/A msg N/A N/A N/A grad_op_tree pp N/A msg N/A N/A autodiff_grads_and_val N/A N/A self _get_autodiff_grads_and_val f_str tensors next_error next_error N/A numerical_grads_and_val N/A N/A self _get_numerical_grads_and_val f_str tensors next_error next_error N/A N/A N/A len autodiff_grads_and_val N/A len numerical_grads_and_val N/A N/A numerical_grads_and_val N/A 1 N/A N/A N/A numerical_grads_and_val N/A 1 reshape N/A N/A autodiff_grads_and_val N/A 1 shape N/A N/A N/A np allclose N/A N/A N/A autodiff_grads_and_val N/A 1 astype N/A self dtype N/A N/A N/A numerical_grads_and_val N/A 1 astype N/A self dtype rtol rtol atol atol N/A count 0 N/A N/A autodiff_grad numerical_grad N/A zip N/A autodiff_grads_and_val N/A 0 N/A numerical_grads_and_val N/A 0 N/A N/A count 1 N/A N/A N/A N/A np allclose N/A N/A autodiff_grad astype N/A self dtype N/A N/A numerical_grad astype N/A self dtype rtol rtol atol atol N/A N/A N/A ValueError N/A debug_msg count N/A test_reduction_shape N/A N/A self N/A N/A N/A be N/A self be N/A x0 N/A N/A be array N/A N/A np array N/A N/A 1 2 N/A 4 5 name x0 N/A f N/A N/A be sum x0 axis 0 N/A N/A N/A f shape N/A 1 2 N/A f N/A N/A be sum x0 axis 1 N/A N/A N/A f shape N/A 2 1 N/A f N/A N/A be sum x0 N/A N/A N/A f shape N/A 1 1 N/A test_reduction N/A N/A self N/A N/A N/A _ N/A range N/A self test_epoch N/A N/A N/A x0 x1 x2 x3 N/A N/A N/A self _rand_gen N/A _ N/A range 4 N/A f_str   (x0 + x2) + be.sum(x0, axis=0)- (x0 - x1) - be.mean(x3, axis=1)+ (x2 + x3) + be.var(x0, axis=0)+ (x2 + x3) + be.std(x0)- (x2 - x3) - be.max(x3, axis=1)- (x2 - x3) - be.min(x3, axis=0)- (x2 - x3) - be.argmax(x3, axis=1)- (x2 - x3) - be.argmin(x3, axis=0) N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 x2 x3 rtol 0.01 N/A test_batchnorm N/A N/A self N/A N/A N/A _ N/A range N/A self test_epoch N/A N/A x0 N/A N/A N/A np random randn 10 64 N/A x1 N/A N/A N/A np random randn 10 1 N/A x2 N/A N/A N/A np random randn 10 1 N/A next_error N/A N/A N/A N/A np random randn 10 64 64.0 N/A f_str ((x0 - be.mean(x0, axis=1)) / be.sqrt(be.var(x0, axis=1) + 1e-6)) * x1 + x2 N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 x2 rtol 0.1 atol 0.01 next_error next_error N/A test_positive N/A N/A self N/A N/A N/A _ N/A range N/A self test_epoch N/A N/A N/A x0 x1 x2 x3 N/A N/A N/A self _rand_gen pos N/A _ N/A range 4 N/A f_str 0.9 ** 0.9 ** x0 + x1 ** 0.9 ** 0.9+ (be.sqrt(x0 + x1 + x2) + x3)- (be.exp(x0 + x1 + x2) + x3)+ (be.exp2(x0 + x1 + x2) + x3)- (be.log(x0 + x1 + x2) + x3)+ (be.log2(x0 + x1 + x2) + x3) N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 x2 x3 rtol 0.01 N/A test_real N/A N/A self N/A N/A N/A _ N/A range N/A self test_epoch N/A N/A N/A x0 x1 x2 x3 N/A N/A N/A self _rand_gen N/A _ N/A range 4 N/A f_str x0 + be.absolute(x1 + x2) + x3- (x0 + be.square(x1 + x2) + x3)+ (x0 + be.sig(x1 + x2) + x3)- (x0 + be.sig2(x1 + x2) + x3)+ (x0 + be.tanh(x1 + x2) + x3)- (x0 + be.tanh2(x1 + x2) + x3)+ (x0 + be.maximum(x0 + x1, x2 + x3) + x3) N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 x2 x3 rtol 0.01 N/A test_unbroadcast N/A N/A self N/A N/A N/A _ N/A range N/A self test_epoch N/A N/A x0 N/A N/A self _rand_gen scalar N/A x1 N/A N/A self _rand_gen N/A f_str x0 + x0 + x1 + x1 N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 rtol 0.01 N/A x0 N/A N/A self _rand_gen col N/A x1 N/A N/A self _rand_gen N/A f_str x0 + x0 + x1 + x1 + x0 N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 rtol 0.01 N/A x0 N/A N/A self _rand_gen row N/A x1 N/A N/A self _rand_gen N/A f_str x0 + x0 + x1 + x1 + x0 N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 rtol 0.01 N/A x0 N/A N/A self _rand_gen scalar N/A x1 N/A N/A self _rand_gen row N/A x2 N/A N/A self _rand_gen col N/A x3 N/A N/A self _rand_gen N/A f_str x0 + x1 + x3 * x2 + x0 + be.tanh(x1) + x3 N/A N/A N/A self _assert_grad_equal f_str N/A x0 x1 x2 x3 rtol 0.01 N/A test_hard_coded N/A N/A self N/A N/A N/A 
        The most basic test case
         N/A be N/A self be N/A x0 N/A N/A be array N/A N/A N/A np ones N/A 3 3 1 name x0 dtype N/A self dtype N/A x1 N/A N/A be array N/A N/A N/A np ones N/A 3 3 2 name x1 dtype N/A self dtype N/A x2 N/A N/A be array N/A N/A N/A np ones N/A 3 3 3 name x2 dtype N/A self dtype N/A x3 N/A N/A be array N/A N/A N/A np ones N/A 3 3 5 name x3 dtype N/A self dtype N/A f N/A N/A N/A N/A N/A x0 x0 N/A x1 x0 N/A x0 x2 N/A N/A x2 x1 x0 N/A N/A x3 x3 x3 N/A ad N/A Autodiff f be N/A x0_grad N/A N/A be array N/A N/A N/A np ones N/A 3 3 -3 dtype N/A self dtype N/A x1_grad N/A N/A be array N/A N/A N/A np ones N/A 3 3 -4 dtype N/A self dtype N/A x2_grad N/A N/A be array N/A N/A N/A np ones N/A 3 3 -1 dtype N/A self dtype N/A x3_grad N/A N/A be array N/A N/A N/A np ones N/A 3 3 75 dtype N/A self dtype N/A N/A N/A np allclose N/A N/A N/A ad get_grad_asnumpyarray N/A x0 N/A 0 N/A N/A x0_grad get atol 1e-05 N/A N/A N/A np allclose N/A N/A N/A ad get_grad_asnumpyarray N/A x1 N/A 0 N/A N/A x1_grad get atol 1e-05 N/A N/A N/A np allclose N/A N/A N/A ad get_grad_asnumpyarray N/A x2 N/A 0 N/A N/A x2_grad get atol 1e-05 N/A N/A N/A np allclose N/A N/A N/A ad get_grad_asnumpyarray N/A x3 N/A 0 N/A N/A x3_grad get atol 1e-05 N/A N/A N/A N/A N/A pytest mark usefixtures backend_default