Go: Update generated wrapper functions for TensorFlow ops.

PiperOrigin-RevId: 322461142
Change-Id: Idfc03fde2f11d9cf21ece08f252a6971a8955b85
This commit is contained in:
A. Unique TensorFlower 2020-07-21 15:59:36 -07:00 committed by TensorFlower Gardener
parent 145d21a90d
commit 4e4cfe7e65

View File

@ -8508,99 +8508,6 @@ func IteratorGetNextSync(scope *Scope, iterator tf.Output, output_types []tf.Dat
return components
}
// RaggedCountSparseOutputAttr is an optional argument to RaggedCountSparseOutput.
type RaggedCountSparseOutputAttr func(optionalAttr)
// RaggedCountSparseOutputMinlength sets the optional minlength attribute to value.
//
// value: Minimum value to count. Can be set to -1 for no minimum.
// If not specified, defaults to -1
//
// REQUIRES: value >= -1
func RaggedCountSparseOutputMinlength(value int64) RaggedCountSparseOutputAttr {
return func(m optionalAttr) {
m["minlength"] = value
}
}
// RaggedCountSparseOutputMaxlength sets the optional maxlength attribute to value.
//
// value: Maximum value to count. Can be set to -1 for no maximum.
// If not specified, defaults to -1
//
// REQUIRES: value >= -1
func RaggedCountSparseOutputMaxlength(value int64) RaggedCountSparseOutputAttr {
return func(m optionalAttr) {
m["maxlength"] = value
}
}
// Performs sparse-output bin counting for a ragged tensor input.
//
// Counts the number of times each value occurs in the input.
//
// Arguments:
// splits: Tensor containing the row splits of the ragged tensor to count.
// values: Tensor containing values of the sparse tensor to count.
// weights: A Tensor of the same shape as indices containing per-index weight values.
// May also be the empty tensor if no weights are used.
// binary_output: Whether to output the number of occurrences of each value or 1.
//
// Returns:
// output_indices: Indices tensor for the resulting sparse tensor object.
// output_values: Values tensor for the resulting sparse tensor object.
// output_dense_shape: Shape tensor for the resulting sparse tensor object.
// END
// }
// attr {
// name: "T"
// description: <<END
// Dtype of the input values tensor.
func RaggedCountSparseOutput(scope *Scope, splits tf.Output, values tf.Output, weights tf.Output, binary_output bool, optional ...RaggedCountSparseOutputAttr) (output_indices tf.Output, output_values tf.Output, output_dense_shape tf.Output) {
if scope.Err() != nil {
return
}
attrs := map[string]interface{}{"binary_output": binary_output}
for _, a := range optional {
a(attrs)
}
opspec := tf.OpSpec{
Type: "RaggedCountSparseOutput",
Input: []tf.Input{
splits, values, weights,
},
Attrs: attrs,
}
op := scope.AddOperation(opspec)
return op.Output(0), op.Output(1), op.Output(2)
}
// Gets the next output from the given iterator .
func IteratorGetNext(scope *Scope, iterator tf.Output, output_types []tf.DataType, output_shapes []tf.Shape) (components []tf.Output) {
if scope.Err() != nil {
return
}
attrs := map[string]interface{}{"output_types": output_types, "output_shapes": output_shapes}
opspec := tf.OpSpec{
Type: "IteratorGetNext",
Input: []tf.Input{
iterator,
},
Attrs: attrs,
}
op := scope.AddOperation(opspec)
if scope.Err() != nil {
return
}
var idx int
var err error
if components, idx, err = makeOutputList(op, idx, "components"); err != nil {
scope.UpdateErr("IteratorGetNext", err)
return
}
return components
}
// Makes a new iterator from the given `dataset` and stores it in `iterator`.
//
// This operation may be executed multiple times. Each execution will reset the
@ -11324,6 +11231,114 @@ func DynamicStitch(scope *Scope, indices []tf.Output, data []tf.Output) (merged
return op.Output(0)
}
// RaggedCountSparseOutputAttr is an optional argument to RaggedCountSparseOutput.
type RaggedCountSparseOutputAttr func(optionalAttr)
// RaggedCountSparseOutputMinlength sets the optional minlength attribute to value.
//
// value: Minimum value to count. Can be set to -1 for no minimum.
// If not specified, defaults to -1
//
// REQUIRES: value >= -1
func RaggedCountSparseOutputMinlength(value int64) RaggedCountSparseOutputAttr {
return func(m optionalAttr) {
m["minlength"] = value
}
}
// RaggedCountSparseOutputMaxlength sets the optional maxlength attribute to value.
//
// value: Maximum value to count. Can be set to -1 for no maximum.
// If not specified, defaults to -1
//
// REQUIRES: value >= -1
func RaggedCountSparseOutputMaxlength(value int64) RaggedCountSparseOutputAttr {
return func(m optionalAttr) {
m["maxlength"] = value
}
}
// Performs sparse-output bin counting for a ragged tensor input.
//
// Counts the number of times each value occurs in the input.
//
// Arguments:
// splits: Tensor containing the row splits of the ragged tensor to count.
// values: Tensor containing values of the sparse tensor to count.
// weights: A Tensor of the same shape as indices containing per-index weight values.
// May also be the empty tensor if no weights are used.
// binary_output: Whether to output the number of occurrences of each value or 1.
//
// Returns:
// output_indices: Indices tensor for the resulting sparse tensor object.
// output_values: Values tensor for the resulting sparse tensor object.
// output_dense_shape: Shape tensor for the resulting sparse tensor object.
// END
// }
// attr {
// name: "T"
// description: <<END
// Dtype of the input values tensor.
func RaggedCountSparseOutput(scope *Scope, splits tf.Output, values tf.Output, weights tf.Output, binary_output bool, optional ...RaggedCountSparseOutputAttr) (output_indices tf.Output, output_values tf.Output, output_dense_shape tf.Output) {
if scope.Err() != nil {
return
}
attrs := map[string]interface{}{"binary_output": binary_output}
for _, a := range optional {
a(attrs)
}
opspec := tf.OpSpec{
Type: "RaggedCountSparseOutput",
Input: []tf.Input{
splits, values, weights,
},
Attrs: attrs,
}
op := scope.AddOperation(opspec)
return op.Output(0), op.Output(1), op.Output(2)
}
// Gets the next output from the given iterator .
func IteratorGetNext(scope *Scope, iterator tf.Output, output_types []tf.DataType, output_shapes []tf.Shape) (components []tf.Output) {
if scope.Err() != nil {
return
}
attrs := map[string]interface{}{"output_types": output_types, "output_shapes": output_shapes}
opspec := tf.OpSpec{
Type: "IteratorGetNext",
Input: []tf.Input{
iterator,
},
Attrs: attrs,
}
op := scope.AddOperation(opspec)
if scope.Err() != nil {
return
}
var idx int
var err error
if components, idx, err = makeOutputList(op, idx, "components"); err != nil {
scope.UpdateErr("IteratorGetNext", err)
return
}
return components
}
// Computes the static batch size of a dataset sans partial batches.
func ComputeBatchSize(scope *Scope, input_dataset tf.Output) (batch_size tf.Output) {
if scope.Err() != nil {
return
}
opspec := tf.OpSpec{
Type: "ComputeBatchSize",
Input: []tf.Input{
input_dataset,
},
}
op := scope.AddOperation(opspec)
return op.Output(0)
}
// Uncompresses a compressed dataset element.
func UncompressElement(scope *Scope, compressed tf.Output, output_types []tf.DataType, output_shapes []tf.Shape) (components []tf.Output) {
if scope.Err() != nil {