Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 294254653 Change-Id: I2572498325158a78fa2f0ad4677d718c0a31d275
This commit is contained in:
parent
48bfb8068d
commit
e253ee6945
@ -15580,6 +15580,12 @@ func HashTableV2(scope *Scope, key_dtype tf.DataType, value_dtype tf.DataType, o
|
||||
//
|
||||
// The pattern follows the re2 syntax (https://github.com/google/re2/wiki/Syntax)
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.regex_full_match(["TF lib", "lib TF"], ".*lib$")
|
||||
// <tf.Tensor: shape=(2,), dtype=bool, numpy=array([ True, False])>
|
||||
// >>> tf.strings.regex_full_match(["TF lib", "lib TF"], ".*TF$")
|
||||
// <tf.Tensor: shape=(2,), dtype=bool, numpy=array([False, True])>
|
||||
//
|
||||
// Arguments:
|
||||
// input: A string tensor of the text to be processed.
|
||||
// pattern: A scalar string tensor containing the regular expression to match the input.
|
||||
@ -19929,6 +19935,12 @@ func AsStringFill(value string) AsStringAttr {
|
||||
// For Unicode, see the
|
||||
// [https://www.tensorflow.org/tutorials/representation/unicode](Working with Unicode text)
|
||||
// tutorial.
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.as_string([3, 2])
|
||||
// <tf.Tensor: shape=(2,), dtype=string, numpy=array([b'3', b'2'], dtype=object)>
|
||||
// >>> tf.strings.as_string([3.1415926, 2.71828], precision=2).numpy()
|
||||
// array([b'3.14', b'2.72'], dtype=object)
|
||||
func AsString(scope *Scope, input tf.Output, optional ...AsStringAttr) (output tf.Output) {
|
||||
if scope.Err() != nil {
|
||||
return
|
||||
@ -38707,6 +38719,15 @@ func UnicodeTranscodeReplaceControlCharacters(value bool) UnicodeTranscodeAttr {
|
||||
// with an explicit endianness, the BOM is not considered part of the string itself
|
||||
// but as metadata, and so is not preserved in the output.
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.unicode_transcode(["Hello", "TensorFlow", "2.x"], "UTF-8", "UTF-16-BE")
|
||||
// <tf.Tensor: shape=(3,), dtype=string, numpy=
|
||||
// array([b'\x00H\x00e\x00l\x00l\x00o',
|
||||
// b'\x00T\x00e\x00n\x00s\x00o\x00r\x00F\x00l\x00o\x00w',
|
||||
// b'\x002\x00.\x00x'], dtype=object)>
|
||||
// >>> tf.strings.unicode_transcode(["A", "B", "C"], "US ASCII", "UTF-8").numpy()
|
||||
// array([b'A', b'B', b'C'], dtype=object)
|
||||
//
|
||||
// Arguments:
|
||||
// input: The text to be processed. Can have any shape.
|
||||
// input_encoding: Text encoding of the input strings. This is any of the encodings supported
|
||||
@ -39027,6 +39048,10 @@ func DecodeCompressed(scope *Scope, bytes tf.Output, optional ...DecodeCompresse
|
||||
// The additional robustness comes at a cost of roughly 4x higher compute
|
||||
// time than `tf.string_to_hash_bucket_fast`.
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.to_hash_bucket_strong(["Hello", "TF"], 3, [1, 2]).numpy()
|
||||
// array([2, 0])
|
||||
//
|
||||
// Arguments:
|
||||
// input: The strings to assign a hash bucket.
|
||||
// num_buckets: The number of buckets.
|
||||
@ -39130,6 +39155,10 @@ func ResourceApplyAdadelta(scope *Scope, var_ tf.Output, accum tf.Output, accum_
|
||||
// to the same bucket. To prevent this problem, use a strong hash function with
|
||||
// `tf.string_to_hash_bucket_strong`.
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.to_hash_bucket_fast(["Hello", "TensorFlow", "2.x"], 3).numpy()
|
||||
// array([0, 2, 2])
|
||||
//
|
||||
// Arguments:
|
||||
// input: The strings to assign a hash bucket.
|
||||
// num_buckets: The number of buckets.
|
||||
@ -39168,6 +39197,11 @@ func StringJoinSeparator(value string) StringJoinAttr {
|
||||
//
|
||||
// with the given separator (default is an empty separator).
|
||||
//
|
||||
// Examples:
|
||||
// >>> s = ["hello", "world", "tensorflow"]
|
||||
// >>> tf.strings.join(s, " ")
|
||||
// <tf.Tensor: shape=(), dtype=string, numpy=b'hello world tensorflow'>
|
||||
//
|
||||
// Arguments:
|
||||
// inputs: A list of string tensors. The tensors must all have the same shape,
|
||||
// or be scalars. Scalars may be mixed in; these will be broadcast to the shape
|
||||
@ -39986,6 +40020,10 @@ func OptionalGetValue(scope *Scope, optional tf.Output, output_types []tf.DataTy
|
||||
// Returns -1 (USCRIPT_INVALID_CODE) for invalid codepoints. Output shape will
|
||||
// match input shape.
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.unicode_script([1, 31, 38])
|
||||
// <tf.Tensor: shape=(3,), dtype=int32, numpy=array([0, 0, 0], dtype=int32)>
|
||||
//
|
||||
// Arguments:
|
||||
// input: A Tensor of int32 Unicode code points.
|
||||
//
|
||||
@ -43632,6 +43670,10 @@ func ResourceApplyMomentum(scope *Scope, var_ tf.Output, accum tf.Output, lr tf.
|
||||
// input: A string `Tensor` of any shape.
|
||||
//
|
||||
// Returns A string `Tensor` of the same shape as the input.
|
||||
//
|
||||
// Examples:
|
||||
// >>> tf.strings.strip(["\nTensorFlow", " The python library "]).numpy()
|
||||
// array([b'TensorFlow', b'The python library'], dtype=object)
|
||||
func StringStrip(scope *Scope, input tf.Output) (output tf.Output) {
|
||||
if scope.Err() != nil {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user