tensorflow::ops::IdentityN

#include <array_ops.h>

Restituisce un elenco di tensori con le stesse forme e lo stesso contenuto dell'input.

Riepilogo

tensori.

Questa operazione può essere utilizzata per sovrascrivere il gradiente per funzioni complesse. Ad esempio, supponiamo che y = f(x) e che desideriamo applicare una funzione personalizzata g per la retropropagazione in modo tale che dx = g(dy). In Python,

with tf.get_default_graph().gradient_override_map(
    {'IdentityN': 'OverrideGradientWithG'}):
  y, _ = identity_n([f(x), x])

.RegisterGradient('OverrideGradientWithG')
def ApplyG(op, dy, _):
  return [None, g(dy)]  # Do not backprop to f(x).

Argomentazioni:

  • ambito: un oggetto Scope

Resi:

  • OutputList : Il tensore di output.

Costruttori e distruttori

IdentityN (const :: tensorflow::Scope & scope, :: tensorflow::InputList input)

attributi pubblici

operation
output

Funzioni pubbliche

operator[] (size_t index) const

attributi pubblici

operazione

Operation operation

produzione

::tensorflow::OutputList output

Funzioni pubbliche

IdentitàN

 IdentityN(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList input
)

operatore[]

::tensorflow::Output operator[](
  size_t index
) const