@tf_export('copy')
def copy(input, tensor_name='', debug_ops_spec=[], name=None):
    'Copy Op.\n\n  Performs CPU-to-CPU or GPU-to-GPU deep-copying of tensor, depending on the\n  device on which the tensor is allocated.\n  N.B.: If the all downstream attached debug ops are disabled given the current\n  gRPC gating status, the output will simply forward the input tensor without\n  deep-copying. See the documentation of Debug* ops for more details.\n\n  Unlike the CopyHost Op, this op does not have HostMemory constraint on its\n  input or output.\n\n  Args:\n    input: A `Tensor`. Input tensor.\n    tensor_name: An optional `string`. Defaults to `""`.\n      The name of the input tensor.\n    debug_ops_spec: An optional list of `strings`. Defaults to `[]`.\n      A list of debug op spec (op, url, gated_grpc) for attached debug\n      ops. Each element of the list has the format\n      <debug_op>;<grpc_url>;<gated_grpc>, wherein gated_grpc is boolean represented\n      as 0/1. E.g., "DebugIdentity;grpc://foo:3333;1",\n      "DebugIdentity;file:///tmp/tfdbg_1;0".\n    name: A name for the operation (optional).\n\n  Returns:\n    A `Tensor`. Has the same type as `input`.\n    Output tensor, deep-copied from input.\n  '
    _ctx = _context.context()
    if (not _ctx.executing_eagerly()):
        if (tensor_name is None):
            tensor_name = ''
        tensor_name = _execute.make_str(tensor_name, 'tensor_name')
        if (debug_ops_spec is None):
            debug_ops_spec = []
        if (not isinstance(debug_ops_spec, (list, tuple))):
            raise TypeError(("Expected list for 'debug_ops_spec' argument to 'copy' Op, not %r." % debug_ops_spec))
        debug_ops_spec = [_execute.make_str(_s, 'debug_ops_spec') for _s in debug_ops_spec]
        (_, _, _op) = _op_def_lib._apply_op_helper('Copy', input=input, tensor_name=tensor_name, debug_ops_spec=debug_ops_spec, name=name)
        _result = _op.outputs[:]
        _inputs_flat = _op.inputs
        _attrs = ('T', _op.get_attr('T'), 'tensor_name', _op.get_attr('tensor_name'), 'debug_ops_spec', _op.get_attr('debug_ops_spec'))
        _execute.record_gradient('Copy', _inputs_flat, _attrs, _result, name)
        (_result,) = _result
        return _result
    else:
        try:
            _result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._handle, _ctx.device_name, 'Copy', name, _ctx._post_execution_callbacks, input, 'tensor_name', tensor_name, 'debug_ops_spec', debug_ops_spec)
            return _result
        except _core._FallbackException:
            return copy_eager_fallback(input, tensor_name=tensor_name, debug_ops_spec=debug_ops_spec, name=name)
        except _core._NotOkStatusException as e:
            if (name is not None):
                message = ((e.message + ' name: ') + name)
            else:
                message = e.message
            _six.raise_from(_core._status_to_exception(e.code, message), None)
Copy Op.

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.

Args:
  input: A `Tensor`. Input tensor.
  tensor_name: An optional `string`. Defaults to `""`.
    The name of the input tensor.
  debug_ops_spec: An optional list of `strings`. Defaults to `[]`.
    A list of debug op spec (op, url, gated_grpc) for attached debug
    ops. Each element of the list has the format
    <debug_op>;<grpc_url>;<gated_grpc>, wherein gated_grpc is boolean represented
    as 0/1. E.g., "DebugIdentity;grpc://foo:3333;1",
    "DebugIdentity;file:///tmp/tfdbg_1;0".
  name: A name for the operation (optional).

Returns:
  A `Tensor`. Has the same type as `input`.
  Output tensor, deep-copied from input.
@tf_export('copy')
def copy(input, tensor_name=, debug_ops_spec=[], name=None):
    'Copy Op.\n\n  Performs CPU-to-CPU or GPU-to-GPU deep-copying of tensor, depending on the\n  device on which the tensor is allocated.\n  N.B.: If the all downstream attached debug ops are disabled given the current\n  gRPC gating status, the output will simply forward the input tensor without\n  deep-copying. See the documentation of Debug* ops for more details.\n\n  Unlike the CopyHost Op, this op does not have HostMemory constraint on its\n  input or output.\n\n  Args:\n    input: A `Tensor`. Input tensor.\n    tensor_name: An optional `string`. Defaults to ``.\n      The name of the input tensor.\n    debug_ops_spec: An optional list of `strings`. Defaults to `[]`.\n      A list of debug op spec (op, url, gated_grpc) for attached debug\n      ops. Each element of the list has the format\n      <debug_op>;<grpc_url>;<gated_grpc>, wherein gated_grpc is boolean represented\n      as 0/1. E.g., "DebugIdentity;grpc://foo:3333;1",\n      "DebugIdentity;file:///tmp/tfdbg_1;0".\n    name: A name for the operation (optional).\n\n  Returns:\n    A `Tensor`. Has the same type as `input`.\n    Output tensor, deep-copied from input.\n  '
    _ctx = _context.context()
    if (not _ctx.executing_eagerly()):
        if (tensor_name is None):
            tensor_name = 
        tensor_name = _execute.make_str(tensor_name, 'tensor_name')
        if (debug_ops_spec is None):
            debug_ops_spec = []
        if (not isinstance(debug_ops_spec, (list, tuple))):
            raise TypeError(("Expected list for 'debug_ops_spec' argument to 'copy' Op, not %r." % debug_ops_spec))
        debug_ops_spec = [_execute.make_str(_s, 'debug_ops_spec') for _s in debug_ops_spec]
        (_, _, _op) = _op_def_lib._apply_op_helper('Copy', input=input, tensor_name=tensor_name, debug_ops_spec=debug_ops_spec, name=name)
        _result = _op.outputs[:]
        _inputs_flat = _op.inputs
        _attrs = ('T', _op.get_attr('T'), 'tensor_name', _op.get_attr('tensor_name'), 'debug_ops_spec', _op.get_attr('debug_ops_spec'))
        _execute.record_gradient('Copy', _inputs_flat, _attrs, _result, name)
        (_result,) = _result
        return _result
    else:
        try:
            _result = _pywrap_tensorflow.TFE_Py_FastPathExecute(_ctx._handle, _ctx.device_name, 'Copy', name, _ctx._post_execution_callbacks, input, 'tensor_name', tensor_name, 'debug_ops_spec', debug_ops_spec)
            return _result
        except _core._FallbackException:
            return copy_eager_fallback(input, tensor_name=tensor_name, debug_ops_spec=debug_ops_spec, name=name)
        except _core._NotOkStatusException as e:
            if (name is not None):
                message = ((e.message + ' name: ') + name)
            else:
                message = e.message
            _six.raise_from(_core._status_to_exception(e.code, message), None)