Class StringFormat

java.lang.Object
org.tensorflow.op.RawOp
org.tensorflow.op.strings.StringFormat
All Implemented Interfaces:
Shaped, Op, Operand<TString>

@Operator(group="strings") public final class StringFormat extends RawOp implements Operand<TString>
Formats a string template using a list of tensors. Formats a string template using a list of tensors, pretty-printing tensor summaries.
  • Field Details

  • Constructor Details

    • StringFormat

      public StringFormat(Operation operation)
  • Method Details

    • create

      @Endpoint(describeByClass=true) public static StringFormat create(Scope scope, Iterable<Operand<?>> inputs, StringFormat.Options... options)
      Factory method to create a class wrapping a new StringFormat operation.
      Parameters:
      scope - current scope
      inputs - The list of tensors to format into the placeholder string.
      options - carries optional attribute values
      Returns:
      a new instance of StringFormat
    • template

      public static StringFormat.Options template(String template)
      Sets the template option.
      Parameters:
      template - A string, the template to format tensor summaries into.
      Returns:
      this Options instance.
    • placeholder

      public static StringFormat.Options placeholder(String placeholder)
      Sets the placeholder option.
      Parameters:
      placeholder - A string, at each placeholder in the template a subsequent tensor summary will be inserted.
      Returns:
      this Options instance.
    • summarize

      public static StringFormat.Options summarize(Long summarize)
      Sets the summarize option.
      Parameters:
      summarize - When formatting the tensor summaries print the first and last summarize entries of each tensor dimension.
      Returns:
      this Options instance.
    • output

      public Output<TString> output()
      Gets output. = The resulting string scalar.
      Returns:
      output.
    • asOutput

      public Output<TString> asOutput()
      Description copied from interface: Operand
      Returns the symbolic handle of the 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.

      Specified by:
      asOutput in interface Operand<TString>
      See Also: