aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/go
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-05-04 17:46:13 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-05 08:38:38 -0700
commitb81f2dcaaa2559880c7705fb0ea91d0d825fd59c (patch)
tree9fb8da3508131c81b4d5cd9e2d33e0da9adf8b2a /tensorflow/go
parentdedcf1dc3f59416fb2eaebb4fc2e5470fc2ae647 (diff)
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 195499636
Diffstat (limited to 'tensorflow/go')
-rw-r--r--tensorflow/go/op/wrappers.go262
1 files changed, 131 insertions, 131 deletions
diff --git a/tensorflow/go/op/wrappers.go b/tensorflow/go/op/wrappers.go
index c12ea51563..eed6dac071 100644
--- a/tensorflow/go/op/wrappers.go
+++ b/tensorflow/go/op/wrappers.go
@@ -2544,6 +2544,72 @@ func EditDistance(scope *Scope, hypothesis_indices tf.Output, hypothesis_values
return op.Output(0)
}
+// Reverses specific dimensions of a tensor.
+//
+// Given a `tensor`, and a `bool` tensor `dims` representing the dimensions
+// of `tensor`, this operation reverses each dimension i of `tensor` where
+// `dims[i]` is `True`.
+//
+// `tensor` can have up to 8 dimensions. The number of dimensions
+// of `tensor` must equal the number of elements in `dims`. In other words:
+//
+// `rank(tensor) = size(dims)`
+//
+// For example:
+//
+// ```
+// # tensor 't' is [[[[ 0, 1, 2, 3],
+// # [ 4, 5, 6, 7],
+// # [ 8, 9, 10, 11]],
+// # [[12, 13, 14, 15],
+// # [16, 17, 18, 19],
+// # [20, 21, 22, 23]]]]
+// # tensor 't' shape is [1, 2, 3, 4]
+//
+// # 'dims' is [False, False, False, True]
+// reverse(t, dims) ==> [[[[ 3, 2, 1, 0],
+// [ 7, 6, 5, 4],
+// [ 11, 10, 9, 8]],
+// [[15, 14, 13, 12],
+// [19, 18, 17, 16],
+// [23, 22, 21, 20]]]]
+//
+// # 'dims' is [False, True, False, False]
+// reverse(t, dims) ==> [[[[12, 13, 14, 15],
+// [16, 17, 18, 19],
+// [20, 21, 22, 23]
+// [[ 0, 1, 2, 3],
+// [ 4, 5, 6, 7],
+// [ 8, 9, 10, 11]]]]
+//
+// # 'dims' is [False, False, True, False]
+// reverse(t, dims) ==> [[[[8, 9, 10, 11],
+// [4, 5, 6, 7],
+// [0, 1, 2, 3]]
+// [[20, 21, 22, 23],
+// [16, 17, 18, 19],
+// [12, 13, 14, 15]]]]
+// ```
+//
+// Arguments:
+// tensor: Up to 8-D.
+// dims: 1-D. The dimensions to reverse.
+//
+// Returns The same shape as `tensor`.
+func Reverse(scope *Scope, tensor tf.Output, dims tf.Output) (output tf.Output) {
+ if scope.Err() != nil {
+ return
+ }
+ opspec := tf.OpSpec{
+ Type: "Reverse",
+ Input: []tf.Input{
+ tensor, dims,
+ },
+ }
+ op := scope.AddOperation(opspec)
+ return op.Output(0)
+}
+
// Clips tensor values to a specified min and max.
//
// Given a tensor `t`, this operation returns a tensor of the same type and
@@ -2796,71 +2862,6 @@ func Asin(scope *Scope, x tf.Output) (y tf.Output) {
return op.Output(0)
}
-// SparseToDenseAttr is an optional argument to SparseToDense.
-type SparseToDenseAttr func(optionalAttr)
-
-// SparseToDenseValidateIndices sets the optional validate_indices attribute to value.
-//
-// value: If true, indices are checked to make sure they are sorted in
-// lexicographic order and that there are no repeats.
-// If not specified, defaults to true
-func SparseToDenseValidateIndices(value bool) SparseToDenseAttr {
- return func(m optionalAttr) {
- m["validate_indices"] = value
- }
-}
-
-// Converts a sparse representation into a dense tensor.
-//
-// Builds an array `dense` with shape `output_shape` such that
-//
-// ```
-// # If sparse_indices is scalar
-// dense[i] = (i == sparse_indices ? sparse_values : default_value)
-//
-// # If sparse_indices is a vector, then for each i
-// dense[sparse_indices[i]] = sparse_values[i]
-//
-// # If sparse_indices is an n by d matrix, then for each i in [0, n)
-// dense[sparse_indices[i][0], ..., sparse_indices[i][d-1]] = sparse_values[i]
-// ```
-//
-// All other values in `dense` are set to `default_value`. If `sparse_values` is a
-// scalar, all sparse indices are set to this single value.
-//
-// Indices should be sorted in lexicographic order, and indices must not
-// contain any repeats. If `validate_indices` is true, these properties
-// are checked during execution.
-//
-// Arguments:
-// sparse_indices: 0-D, 1-D, or 2-D. `sparse_indices[i]` contains the complete
-// index where `sparse_values[i]` will be placed.
-// output_shape: 1-D. Shape of the dense output tensor.
-// sparse_values: 1-D. Values corresponding to each row of `sparse_indices`,
-// or a scalar value to be used for all sparse indices.
-// default_value: Scalar value to set for indices not specified in
-// `sparse_indices`.
-//
-// Returns Dense output tensor of shape `output_shape`.
-func SparseToDense(scope *Scope, sparse_indices tf.Output, output_shape tf.Output, sparse_values tf.Output, default_value tf.Output, optional ...SparseToDenseAttr) (dense tf.Output) {
- if scope.Err() != nil {
- return
- }
- attrs := map[string]interface{}{}
- for _, a := range optional {
- a(attrs)
- }
- opspec := tf.OpSpec{
- Type: "SparseToDense",
- Input: []tf.Input{
- sparse_indices, output_shape, sparse_values, default_value,
- },
- Attrs: attrs,
- }
- op := scope.AddOperation(opspec)
- return op.Output(0)
-}
-
// Computes the sum along sparse segments of a tensor.
//
// Read @{$math_ops#Segmentation$the section on segmentation} for an explanation of
@@ -6469,72 +6470,6 @@ func SparseFillEmptyRows(scope *Scope, indices tf.Output, values tf.Output, dens
return op.Output(0), op.Output(1), op.Output(2), op.Output(3)
}
-// Reverses specific dimensions of a tensor.
-//
-// Given a `tensor`, and a `bool` tensor `dims` representing the dimensions
-// of `tensor`, this operation reverses each dimension i of `tensor` where
-// `dims[i]` is `True`.
-//
-// `tensor` can have up to 8 dimensions. The number of dimensions
-// of `tensor` must equal the number of elements in `dims`. In other words:
-//
-// `rank(tensor) = size(dims)`
-//
-// For example:
-//
-// ```
-// # tensor 't' is [[[[ 0, 1, 2, 3],
-// # [ 4, 5, 6, 7],
-// # [ 8, 9, 10, 11]],
-// # [[12, 13, 14, 15],
-// # [16, 17, 18, 19],
-// # [20, 21, 22, 23]]]]
-// # tensor 't' shape is [1, 2, 3, 4]
-//
-// # 'dims' is [False, False, False, True]
-// reverse(t, dims) ==> [[[[ 3, 2, 1, 0],
-// [ 7, 6, 5, 4],
-// [ 11, 10, 9, 8]],
-// [[15, 14, 13, 12],
-// [19, 18, 17, 16],
-// [23, 22, 21, 20]]]]
-//
-// # 'dims' is [False, True, False, False]
-// reverse(t, dims) ==> [[[[12, 13, 14, 15],
-// [16, 17, 18, 19],
-// [20, 21, 22, 23]
-// [[ 0, 1, 2, 3],
-// [ 4, 5, 6, 7],
-// [ 8, 9, 10, 11]]]]
-//
-// # 'dims' is [False, False, True, False]
-// reverse(t, dims) ==> [[[[8, 9, 10, 11],
-// [4, 5, 6, 7],
-// [0, 1, 2, 3]]
-// [[20, 21, 22, 23],
-// [16, 17, 18, 19],
-// [12, 13, 14, 15]]]]
-// ```
-//
-// Arguments:
-// tensor: Up to 8-D.
-// dims: 1-D. The dimensions to reverse.
-//
-// Returns The same shape as `tensor`.
-func Reverse(scope *Scope, tensor tf.Output, dims tf.Output) (output tf.Output) {
- if scope.Err() != nil {
- return
- }
- opspec := tf.OpSpec{
- Type: "Reverse",
- Input: []tf.Input{
- tensor, dims,
- },
- }
- op := scope.AddOperation(opspec)
- return op.Output(0)
-}
-
// BiasAddGradAttr is an optional argument to BiasAddGrad.
type BiasAddGradAttr func(optionalAttr)
@@ -24884,6 +24819,71 @@ func DecodeJSONExample(scope *Scope, json_examples tf.Output) (binary_examples t
return op.Output(0)
}
+// SparseToDenseAttr is an optional argument to SparseToDense.
+type SparseToDenseAttr func(optionalAttr)
+
+// SparseToDenseValidateIndices sets the optional validate_indices attribute to value.
+//
+// value: If true, indices are checked to make sure they are sorted in
+// lexicographic order and that there are no repeats.
+// If not specified, defaults to true
+func SparseToDenseValidateIndices(value bool) SparseToDenseAttr {
+ return func(m optionalAttr) {
+ m["validate_indices"] = value
+ }
+}
+
+// Converts a sparse representation into a dense tensor.
+//
+// Builds an array `dense` with shape `output_shape` such that
+//
+// ```
+// # If sparse_indices is scalar
+// dense[i] = (i == sparse_indices ? sparse_values : default_value)
+//
+// # If sparse_indices is a vector, then for each i
+// dense[sparse_indices[i]] = sparse_values[i]
+//
+// # If sparse_indices is an n by d matrix, then for each i in [0, n)
+// dense[sparse_indices[i][0], ..., sparse_indices[i][d-1]] = sparse_values[i]
+// ```
+//
+// All other values in `dense` are set to `default_value`. If `sparse_values` is a
+// scalar, all sparse indices are set to this single value.
+//
+// Indices should be sorted in lexicographic order, and indices must not
+// contain any repeats. If `validate_indices` is true, these properties
+// are checked during execution.
+//
+// Arguments:
+// sparse_indices: 0-D, 1-D, or 2-D. `sparse_indices[i]` contains the complete
+// index where `sparse_values[i]` will be placed.
+// output_shape: 1-D. Shape of the dense output tensor.
+// sparse_values: 1-D. Values corresponding to each row of `sparse_indices`,
+// or a scalar value to be used for all sparse indices.
+// default_value: Scalar value to set for indices not specified in
+// `sparse_indices`.
+//
+// Returns Dense output tensor of shape `output_shape`.
+func SparseToDense(scope *Scope, sparse_indices tf.Output, output_shape tf.Output, sparse_values tf.Output, default_value tf.Output, optional ...SparseToDenseAttr) (dense tf.Output) {
+ if scope.Err() != nil {
+ return
+ }
+ attrs := map[string]interface{}{}
+ for _, a := range optional {
+ a(attrs)
+ }
+ opspec := tf.OpSpec{
+ Type: "SparseToDense",
+ Input: []tf.Input{
+ sparse_indices, output_shape, sparse_values, default_value,
+ },
+ Attrs: attrs,
+ }
+ op := scope.AddOperation(opspec)
+ return op.Output(0)
+}
+
// Computes the grayscale dilation of 4-D `input` and 3-D `filter` tensors.
//
// The `input` tensor has shape `[batch, in_height, in_width, depth]` and the