Converts each entry in the given tensor to strings.
Supports many numeric types and boolean.
For Unicode, see the [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text) tutorial.
Examples:
>>> tf.strings.as_string([3, 2])
Nested Classes
class | AsString.Options | Optional attributes for AsString
|
Constants
String | OP_NAME | The name of this op, as known by TensorFlow core engine |
Public Methods
Output<TString> |
asOutput()
Returns the symbolic handle of the tensor.
|
static AsString |
create(Scope scope, Operand<? extends TType> input, Options... options)
Factory method to create a class wrapping a new AsString operation.
|
static AsString.Options |
fill(String fill)
|
Output<TString> |
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)
|
Inherited Methods
Constants
public static final String OP_NAME
The name of this op, as known by TensorFlow core engine
Public Methods
public Output<TString> asOutput ()
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.
public static AsString create (Scope scope, Operand<? extends TType> input, Options... options)
Factory method to create a class wrapping a new AsString operation.
Parameters
scope | current scope |
---|---|
options | carries optional attributes values |
Returns
- a new instance of AsString
public static AsString.Options fill (String fill)
Parameters
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 static AsString.Options precision (Long precision)
Parameters
precision | The post-decimal precision to use for floating point numbers. Only used if precision > -1. |
---|
public static AsString.Options scientific (Boolean scientific)
Parameters
scientific | Use scientific notation for floating point numbers. |
---|
public static AsString.Options shortest (Boolean shortest)
Parameters
shortest | Use shortest representation (either scientific or standard) for floating point numbers. |
---|
public static AsString.Options width (Long width)
Parameters
width | Pad pre-decimal numbers to this width. Applies to both floating point and integer numbers. Only used if width > -1. |
---|