Copy

public final class Copy

Copy a tensor from CPU-to-CPU or GPU-to-GPU.

Performs CPU-to-CPU or GPU-to-GPU deep-copying of tensor, depending on the device on which the tensor is allocated. N.B.: If the all downstream attached debug ops are disabled given the current gRPC gating status, the output will simply forward the input tensor without deep-copying. See the documentation of Debug* ops for more details.

Unlike the CopyHost Op, this op does not have HostMemory constraint on its input or output.

Nested Classes

class Copy.Options Optional attributes for Copy

Public Methods

Output <T>
asOutput ()
Returns the symbolic handle of a tensor.
static <T> Copy <T>
create ( Scope scope, Operand <T> input, Options... options)
Factory method to create a class wrapping a new Copy operation.
static Copy.Options
debugOpsSpec (List<String> debugOpsSpec)
Output <T>
static Copy.Options
tensorName (String tensorName)

Inherited Methods

Public Methods

public Output <T> asOutput ()

Returns the symbolic handle of a tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static Copy <T> create ( Scope scope, Operand <T> input, Options... options)

Factory method to create a class wrapping a new Copy operation.

Parameters
scope current scope
input Input tensor.
options carries optional attributes values
Returns
  • a new instance of Copy

public static Copy.Options debugOpsSpec (List<String> debugOpsSpec)

Parameters
debugOpsSpec A list of debug op spec (op, url, gated_grpc) for attached debug ops. Each element of the list has the format ; ; , wherein gated_grpc is boolean represented as 0/1. E.g., "DebugIdentity;grpc://foo:3333;1", "DebugIdentity;file:///tmp/tfdbg_1;0".

public Output <T> output ()

public static Copy.Options tensorName (String tensorName)

Parameters
tensorName The name of the input tensor.