func_grad: Compute Function Gradient

Description Usage Arguments

Description

Computes the gradient of this Function at location at with respect to wrt. The Function must have a single output.

Usage

1
2
func_grad(func, at, wrt = NULL, outputs = NULL, device = NULL,
  as_matrix = TRUE, grad_root = NULL)

Arguments

func

- The CNTK 'Function' instance on which to apply the operation

at

- mapping of the Function’s arguments to values

wrt

- list of Variables with respect to which the gradient will be computed. If omitted, the gradients with respect to all arguments of this Function that need gradient will be computed.

device

- instance of DeviceDescriptor

as_matrix

- whether to return as an R matrix. Defualt TRUE. Otherwise returns as Python CNTK value which avoids costly conversions

grad_root

- specify the root of gradients calculation. If not specified, the output of this function will be used as gradient root.


Microsoft/CNTK-R documentation built on May 28, 2019, 1:52 p.m.