Struct tfrecord::protos::GradientDef[][src]

pub struct GradientDef {
    pub function_name: String,
    pub gradient_func: String,
}

GradientDef defines the gradient function of a function defined in a function library.

A gradient function g (specified by gradient_func) for a function f (specified by function_name) must follow the following:

The function ‘f’ must be a numerical function which takes N inputs and produces M outputs. Its gradient function ‘g’, which is a function taking N + M inputs and produces N outputs.

I.e. if we have (y1, y2, …, y_M) = f(x1, x2, …, x_N), then, g is (dL/dx1, dL/dx2, …, dL/dx_N) = g(x1, x2, …, x_N, dL/dy1, dL/dy2, …, dL/dy_M), where L is a scalar-value function of (x1, x2, …, xN) (e.g., the loss function). dL/dx_i is the partial derivative of L with respect to x_i.

Fields

function_name: String

The function name.

gradient_func: String

The gradient function’s name.

Trait Implementations

impl Clone for GradientDef[src]

impl Debug for GradientDef[src]

impl Default for GradientDef[src]

impl<'de> Deserialize<'de> for GradientDef[src]

impl Message for GradientDef[src]

impl PartialEq<GradientDef> for GradientDef[src]

impl Serialize for GradientDef[src]

impl StructuralPartialEq for GradientDef[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,