Skip to content

Commit

Permalink
Go: Update generated wrapper functions for TensorFlow ops.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 179954704
  • Loading branch information
tensorflower-gardener committed Dec 22, 2017
1 parent e4532d2 commit 3988e84
Showing 1 changed file with 91 additions and 33 deletions.
124 changes: 91 additions & 33 deletions tensorflow/go/op/wrappers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8732,39 +8732,6 @@ func Print(scope *Scope, input tf.Output, data []tf.Output, optional ...PrintAtt
return op.Output(0)
}

// Makes its input available to the next iteration.
//
// Arguments:
// data: The tensor to be made available to the next iteration.
//
// Returns The same tensor as `data`.
func NextIteration(scope *Scope, data tf.Output) (output tf.Output) {
if scope.Err() != nil {
return
}
opspec := tf.OpSpec{
Type: "NextIteration",
Input: []tf.Input{
data,
},
}
op := scope.AddOperation(opspec)
return op.Output(0)
}

// Does nothing. Only useful as a placeholder for control edges.
//
// Returns the created operation.
func NoOp(scope *Scope) (o *tf.Operation) {
if scope.Err() != nil {
return
}
opspec := tf.OpSpec{
Type: "NoOp",
}
return scope.AddOperation(opspec)
}

// DepthwiseConv2dNativeAttr is an optional argument to DepthwiseConv2dNative.
type DepthwiseConv2dNativeAttr func(optionalAttr)

Expand Down Expand Up @@ -9731,6 +9698,39 @@ func SegmentMax(scope *Scope, data tf.Output, segment_ids tf.Output) (output tf.
return op.Output(0)
}

// Makes its input available to the next iteration.
//
// Arguments:
// data: The tensor to be made available to the next iteration.
//
// Returns The same tensor as `data`.
func NextIteration(scope *Scope, data tf.Output) (output tf.Output) {
if scope.Err() != nil {
return
}
opspec := tf.OpSpec{
Type: "NextIteration",
Input: []tf.Input{
data,
},
}
op := scope.AddOperation(opspec)
return op.Output(0)
}

// Does nothing. Only useful as a placeholder for control edges.
//
// Returns the created operation.
func NoOp(scope *Scope) (o *tf.Operation) {
if scope.Err() != nil {
return
}
opspec := tf.OpSpec{
Type: "NoOp",
}
return scope.AddOperation(opspec)
}

// Returns the rank of a tensor.
//
// This operation returns an integer representing the rank of `input`.
Expand Down Expand Up @@ -9969,6 +9969,53 @@ func ParseSingleExample(scope *Scope, serialized tf.Output, dense_defaults []tf.
return sparse_indices, sparse_values, sparse_shapes, dense_values
}

// DecodeCompressedAttr is an optional argument to DecodeCompressed.
type DecodeCompressedAttr func(optionalAttr)

// DecodeCompressedCompressionType sets the optional compression_type attribute to value.
//
// value: A scalar containing either (i) the empty string (no
// compression), (ii) "ZLIB", or (iii) "GZIP".
// If not specified, defaults to ""
func DecodeCompressedCompressionType(value string) DecodeCompressedAttr {
return func(m optionalAttr) {
m["compression_type"] = value
}
}

// Decompress strings.
//
// This op decompresses each element of the `bytes` input `Tensor`, which
// is assumed to be compressed using the given `compression_type`.
//
// The `output` is a string `Tensor` of the same shape as `bytes`,
// each element containing the decompressed data from the corresponding
// element in `bytes`.
//
// Arguments:
// bytes: A Tensor of string which is compressed.
//
// Returns A Tensor with the same shape as input `bytes`, uncompressed
// from bytes.
func DecodeCompressed(scope *Scope, bytes tf.Output, optional ...DecodeCompressedAttr) (output tf.Output) {
if scope.Err() != nil {
return
}
attrs := map[string]interface{}{}
for _, a := range optional {
a(attrs)
}
opspec := tf.OpSpec{
Type: "DecodeCompressed",
Input: []tf.Input{
bytes,
},
Attrs: attrs,
}
op := scope.AddOperation(opspec)
return op.Output(0)
}

// Copy a tensor setting everything outside a central band in each innermost matrix
//
// to zero.
Expand Down Expand Up @@ -24616,6 +24663,17 @@ func RecordInputBatchSize(value int64) RecordInputAttr {
}
}

// RecordInputCompressionType sets the optional compression_type attribute to value.
//
// value: The type of compression for the file. Currently ZLIB and
// GZIP are supported. Defaults to none.
// If not specified, defaults to ""
func RecordInputCompressionType(value string) RecordInputAttr {
return func(m optionalAttr) {
m["compression_type"] = value
}
}

// Emits randomized records.
//
// Arguments:
Expand Down

0 comments on commit 3988e84

Please sign in to comment.