@Operator(group="dtypes") public final class AsString extends PrimitiveOp implements Operand<String>
Supports many numeric types and boolean.
For Unicode, see the [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) tutorial.
Modifier and Type | Class and Description |
---|---|
static class |
AsString.Options
Optional attributes for
AsString |
operation
Modifier and Type | Method and Description |
---|---|
Output<String> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <T> AsString |
create(Scope scope,
Operand<T> input,
AsString.Options... options)
Factory method to create a class wrapping a new AsString operation.
|
static AsString.Options |
fill(String fill) |
Output<String> |
output() |
static AsString.Options |
precision(Long precision) |
static AsString.Options |
scientific(Boolean scientific) |
static AsString.Options |
shortest(Boolean shortest) |
static AsString.Options |
width(Long width) |
equals, hashCode, op, toString
public static <T> AsString create(Scope scope, Operand<T> input, AsString.Options... options)
scope
- current scopeinput
- options
- carries optional attributes valuespublic static AsString.Options precision(Long precision)
precision
- The post-decimal precision to use for floating point numbers.
Only used if precision > -1.public static AsString.Options scientific(Boolean scientific)
scientific
- Use scientific notation for floating point numbers.public static AsString.Options shortest(Boolean shortest)
shortest
- Use shortest representation (either scientific or standard) for
floating point numbers.public static AsString.Options width(Long width)
width
- Pad pre-decimal numbers to this width.
Applies to both floating point and integer numbers.
Only used if width > -1.public static AsString.Options fill(String fill)
fill
- The value to pad if width > -1. If empty, pads with spaces.
Another typical value is '0'. String cannot be longer than 1 character.public Output<String> asOutput()
Operand
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.
asOutput
in interface Operand<String>
OperationBuilder.addInput(Output)
Copyright © 2022. All rights reserved.