Exemple #1
0
 def concat(self, name=None):
     """Return the values in the TensorArray as a concatenated `Tensor`."""
     value, _ = gen_data_flow_ops._tensor_array_concat(handle=self._handle,
                                                       flow_in=self._flow,
                                                       dtype=self._dtype,
                                                       name=name)
     return value
Exemple #2
0
    def concat(self, name=None):
        """Return the values in the TensorArray as a concatenated `Tensor`.

    All of the values must have been written, their ranks must match, and
    and their shapes must all match for all dimensions except the first.

    Args:
      name: A name for the operation (optional).

    Returns:
      All the tensors in the TensorArray concatenated into one tensor.
    """
        if self._elem_shape and self._elem_shape[0].dims is not None:
            element_shape_except0 = tensor_shape.TensorShape(
                self._elem_shape[0].dims[1:])
        else:
            element_shape_except0 = tensor_shape.TensorShape(None)
        with ops.colocate_with(self._handle):
            value, _ = gen_data_flow_ops._tensor_array_concat(
                handle=self._handle,
                flow_in=self._flow,
                dtype=self._dtype,
                name=name,
                element_shape_except0=element_shape_except0)
            if self._elem_shape and self._elem_shape[0].dims is not None:
                value.set_shape([None] + self._elem_shape[0].dims[1:])
            return value
  def concat(self, name=None):
    """Return the values in the TensorArray as a concatenated `Tensor`.

    All of the values must have been written, their ranks must match, and
    and their shapes must all match for all dimensions except the first.

    Args:
      name: A name for the operation (optional).

    Returns:
      All the tensors in the TensorArray concatenated into one tensor.
    """
    if self._elem_shape and self._elem_shape[0].dims is not None:
      element_shape_except0 = tensor_shape.TensorShape(self._elem_shape[0].dims[
          1:])
    else:
      element_shape_except0 = tensor_shape.TensorShape(None)
    with ops.colocate_with(self._handle):
      value, _ = gen_data_flow_ops._tensor_array_concat(
          handle=self._handle,
          flow_in=self._flow,
          dtype=self._dtype,
          name=name,
          element_shape_except0=element_shape_except0)
      if self._elem_shape and self._elem_shape[0].dims is not None:
        value.set_shape([None] + self._elem_shape[0].dims[1:])
      return value
    def concat(self, name=None):
        """Return the values in the TensorArray as a concatenated `Tensor`.

    All of the values must have been written, their ranks must match, and
    and their shapes must all match for all dimensions except the first.

    Args:
      name: A name for the operation (optional).

    Returns:
      All the tensors in the TensorArray concatenated into one tensor.
    """
        with ops.colocate_with(self._handle):
            value, _ = gen_data_flow_ops._tensor_array_concat(
                handle=self._handle, flow_in=self._flow, dtype=self._dtype, name=name
            )
            return value
Exemple #5
0
    def concat(self, name=None):
        """Return the values in the TensorArray as a concatenated `Tensor`.

    All of the values must have been written, their ranks must match, and
    and their shapes must all match for all dimensions except the first.

    Args:
      name: A name for the operation (optional).

    Returns:
      All the tensors in the TensorArray concatenated into one tensor.
    """
        with ops.colocate_with(self._handle):
            value, _ = gen_data_flow_ops._tensor_array_concat(
                handle=self._handle,
                flow_in=self._flow,
                dtype=self._dtype,
                name=name)
            return value
 def concat(self, name=None):
   """Return the values in the TensorArray as a concatenated `Tensor`."""
   value, _ = gen_data_flow_ops._tensor_array_concat(
       handle=self._handle, flow_in=self._flow, dtype=self._dtype,
       name=name)
   return value