Home
last modified time | relevance | path

Searched refs:grad_fn (Results 1 – 14 of 14) sorted by relevance

/external/tensorflow/tensorflow/python/eager/
Dcustom_gradient.py54 result, grad_fn = f(*args)
60 gradients = nest.flatten(grad_fn(*result_grads[:len(flat_result)]))
75 result, grad_fn = f(*args, **kwargs)
81 return nest.flatten(grad_fn(*outputs))
Dbackprop.py126 grad_fn = ops._gradient_registry.lookup(op_name) # pylint: disable=protected-access
127 if grad_fn is None:
130 return grad_fn(mock_op, *out_grads)
302 def grad_fn(*orig_outputs): function
311 tape.record_operation(op_name, results, inputs, grad_fn)
368 def grad_fn(*args): function
394 return grad_fn
439 def grad_fn(*args, **kwds): function
443 return grad_fn
Dgraph_callable_test.py243 grad_fn = backprop.implicit_grad(my_function)
244 grads_and_vars = list(zip(*grad_fn()))
Dbackprop_test.py103 grad_fn = backprop.gradients_function(f)
104 self.assertAllEqual(2., grad_fn(1., dy=2.)[0])
Dfunction_test.py385 grad_fn = backprop.implicit_grad(sum_gather)
386 gradient = grad_fn()
/external/tensorflow/tensorflow/cc/gradients/
Dgrad_testutil.cc26 ops::GradFunc grad_fn; in CallGradFunction() local
28 op.node()->type_string(), &grad_fn)); in CallGradFunction()
29 TF_RETURN_IF_ERROR(grad_fn(scope, op, grad_inputs, grad_outputs)); in CallGradFunction()
/external/tensorflow/tensorflow/python/ops/
Dgradients_impl.py362 def _MaybeCompile(scope, op, func, grad_fn): argument
377 return grad_fn() # Exit early
380 return grad_fn() # Exit early
396 return grad_fn()
566 grad_fn = None
574 grad_fn = func_call.python_grad_func
580 grad_fn = ops.get_gradient_function(op)
587 if (grad_fn or is_func_call) and has_out_grads:
593 (not grad_fn and is_func_call) or _IsTrainable(op.outputs[i])):
607 if grad_fn:
[all …]
/external/tensorflow/tensorflow/contrib/layers/python/layers/
Drev_block_lib.py434 def grad_fn(inputs, variables, outputs, output_grads): function
451 @_fn_with_custom_grad(grad_fn)
486 def _fn_with_custom_grad(grad_fn, use_global_vars=False): argument
509 fn, args, grad_fn, use_global_vars=use_global_vars)
516 def _fn_with_custom_grad_internal(fn, inputs, grad_fn, use_global_vars=False): argument
539 if grad_fn is None:
556 grad_inputs, grad_vars = grad_fn(fn_inputs, fn_vars, fn_outputs, dys)
Drev_block_lib_test.py293 def grad_fn(inputs, trainable_variables, outputs, grad_outputs): function
302 custom_fn = rev_block_lib._fn_with_custom_grad(grad_fn)(fn)
334 def grad_fn(inputs, trainable_variables, unused_outputs, function
349 out = rev_block_lib._fn_with_custom_grad(grad_fn)(fn)(a, b, c)
/external/tensorflow/tensorflow/contrib/framework/python/ops/
Daccumulate_n_v2_eager_test.py70 grad_fn = backprop.gradients_function(fn)
71 grad = grad_fn(input_vars[0], input_vars[1], input_vars[2])
/external/tensorflow/tensorflow/cc/framework/
Dgradients.cc374 ops::GradFunc grad_fn; in IsPrimitiveOpWithNoGrad() local
375 Status s = registry_->Lookup(opname, &grad_fn); in IsPrimitiveOpWithNoGrad()
376 return s.ok() && (grad_fn == nullptr); in IsPrimitiveOpWithNoGrad()
383 ops::GradFunc grad_fn; in CallGradFunction() local
384 TF_RETURN_IF_ERROR(registry_->Lookup(op.node()->type_string(), &grad_fn)); in CallGradFunction()
385 TF_RETURN_IF_ERROR(grad_fn(scope_, op, grad_inputs, grad_outputs)); in CallGradFunction()
/external/tensorflow/tensorflow/contrib/eager/python/
Dtfe_test.py76 def grad_fn(_): function
79 return y, grad_fn
/external/tensorflow/tensorflow/python/kernel_tests/
Dcholesky_op_test.py358 def _BenchmarkGrad(grad_fn, name, device): argument
367 grad = grad_fn(l, grad_matrix)
Dtensor_array_ops_test.py877 grad_fn = backprop.gradients_function(func)
878 v0_grad, state0_grad, var_grad = grad_fn(v0, state0, var, dy=grad_val)