Go: Update generated wrapper functions for TensorFlow ops.
authorA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 4 Jan 2018 05:16:47 +0000 (21:16 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 4 Jan 2018 05:20:43 +0000 (21:20 -0800)
PiperOrigin-RevId: 180754374

tensorflow/go/op/wrappers.go

index b25123440f1eab3035a7dc1cab2aeb5042bf12fb..e495857afe5a9628bd90b1dc4d787d84ef3a4bb9 100644 (file)
@@ -8732,81 +8732,25 @@ func Print(scope *Scope, input tf.Output, data []tf.Output, optional ...PrintAtt
        return op.Output(0)
 }
 
-// DepthwiseConv2dNativeAttr is an optional argument to DepthwiseConv2dNative.
-type DepthwiseConv2dNativeAttr func(optionalAttr)
-
-// DepthwiseConv2dNativeDataFormat sets the optional data_format attribute to value.
-//
-// value: Specify the data format of the input and output data. With the
-// default format "NHWC", the data is stored in the order of:
-//     [batch, height, width, channels].
-// Alternatively, the format could be "NCHW", the data storage order of:
-//     [batch, channels, height, width].
-// If not specified, defaults to "NHWC"
-func DepthwiseConv2dNativeDataFormat(value string) DepthwiseConv2dNativeAttr {
-       return func(m optionalAttr) {
-               m["data_format"] = value
-       }
-}
-
-// DepthwiseConv2dNativeDilations sets the optional dilations attribute to value.
-//
-// value: 1-D tensor of length 4.  The dilation factor for each dimension of
-// `input`. If set to k > 1, there will be k-1 skipped cells between each filter
-// element on that dimension. The dimension order is determined by the value of
-// `data_format`, see above for details. Dilations in the batch and depth
-// dimensions must be 1.
-// If not specified, defaults to <i:1 i:1 i:1 i:1 >
-func DepthwiseConv2dNativeDilations(value []int64) DepthwiseConv2dNativeAttr {
-       return func(m optionalAttr) {
-               m["dilations"] = value
-       }
-}
-
-// Computes a 2-D depthwise convolution given 4-D `input` and `filter` tensors.
-//
-// Given an input tensor of shape `[batch, in_height, in_width, in_channels]`
-// and a filter / kernel tensor of shape
-// `[filter_height, filter_width, in_channels, channel_multiplier]`, containing
-// `in_channels` convolutional filters of depth 1, `depthwise_conv2d` applies
-// a different filter to each input channel (expanding from 1 channel to
-// `channel_multiplier` channels for each), then concatenates the results
-// together. Thus, the output has `in_channels * channel_multiplier` channels.
-//
-// ```
-// for k in 0..in_channels-1
-//   for q in 0..channel_multiplier-1
-//     output[b, i, j, k * channel_multiplier + q] =
-//       sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *
-//                         filter[di, dj, k, q]
-// ```
-//
-// Must have `strides[0] = strides[3] = 1`.  For the most common case of the same
-// horizontal and vertices strides, `strides = [1, stride, stride, 1]`.
+// Table initializer that takes two tensors for keys and values respectively.
 //
 // Arguments:
+//     table_handle: Handle to a table which will be initialized.
+//     keys: Keys of type Tkey.
+//     values: Values of type Tval.
 //
-//
-//     strides: 1-D of length 4.  The stride of the sliding window for each dimension
-// of `input`.
-//     padding: The type of padding algorithm to use.
-func DepthwiseConv2dNative(scope *Scope, input tf.Output, filter tf.Output, strides []int64, padding string, optional ...DepthwiseConv2dNativeAttr) (output tf.Output) {
+// Returns the created operation.
+func InitializeTableV2(scope *Scope, table_handle tf.Output, keys tf.Output, values tf.Output) (o *tf.Operation) {
        if scope.Err() != nil {
                return
        }
-       attrs := map[string]interface{}{"strides": strides, "padding": padding}
-       for _, a := range optional {
-               a(attrs)
-       }
        opspec := tf.OpSpec{
-               Type: "DepthwiseConv2dNative",
+               Type: "InitializeTableV2",
                Input: []tf.Input{
-                       input, filter,
+                       table_handle, keys, values,
                },
-               Attrs: attrs,
        }
-       op := scope.AddOperation(opspec)
-       return op.Output(0)
+       return scope.AddOperation(opspec)
 }
 
 // DataFormatDimMapAttr is an optional argument to DataFormatDimMap.
@@ -21585,6 +21529,83 @@ func RFFT3D(scope *Scope, input tf.Output, fft_length tf.Output) (output tf.Outp
        return op.Output(0)
 }
 
+// DepthwiseConv2dNativeAttr is an optional argument to DepthwiseConv2dNative.
+type DepthwiseConv2dNativeAttr func(optionalAttr)
+
+// DepthwiseConv2dNativeDataFormat sets the optional data_format attribute to value.
+//
+// value: Specify the data format of the input and output data. With the
+// default format "NHWC", the data is stored in the order of:
+//     [batch, height, width, channels].
+// Alternatively, the format could be "NCHW", the data storage order of:
+//     [batch, channels, height, width].
+// If not specified, defaults to "NHWC"
+func DepthwiseConv2dNativeDataFormat(value string) DepthwiseConv2dNativeAttr {
+       return func(m optionalAttr) {
+               m["data_format"] = value
+       }
+}
+
+// DepthwiseConv2dNativeDilations sets the optional dilations attribute to value.
+//
+// value: 1-D tensor of length 4.  The dilation factor for each dimension of
+// `input`. If set to k > 1, there will be k-1 skipped cells between each filter
+// element on that dimension. The dimension order is determined by the value of
+// `data_format`, see above for details. Dilations in the batch and depth
+// dimensions must be 1.
+// If not specified, defaults to <i:1 i:1 i:1 i:1 >
+func DepthwiseConv2dNativeDilations(value []int64) DepthwiseConv2dNativeAttr {
+       return func(m optionalAttr) {
+               m["dilations"] = value
+       }
+}
+
+// Computes a 2-D depthwise convolution given 4-D `input` and `filter` tensors.
+//
+// Given an input tensor of shape `[batch, in_height, in_width, in_channels]`
+// and a filter / kernel tensor of shape
+// `[filter_height, filter_width, in_channels, channel_multiplier]`, containing
+// `in_channels` convolutional filters of depth 1, `depthwise_conv2d` applies
+// a different filter to each input channel (expanding from 1 channel to
+// `channel_multiplier` channels for each), then concatenates the results
+// together. Thus, the output has `in_channels * channel_multiplier` channels.
+//
+// ```
+// for k in 0..in_channels-1
+//   for q in 0..channel_multiplier-1
+//     output[b, i, j, k * channel_multiplier + q] =
+//       sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *
+//                         filter[di, dj, k, q]
+// ```
+//
+// Must have `strides[0] = strides[3] = 1`.  For the most common case of the same
+// horizontal and vertices strides, `strides = [1, stride, stride, 1]`.
+//
+// Arguments:
+//
+//
+//     strides: 1-D of length 4.  The stride of the sliding window for each dimension
+// of `input`.
+//     padding: The type of padding algorithm to use.
+func DepthwiseConv2dNative(scope *Scope, input tf.Output, filter tf.Output, strides []int64, padding string, optional ...DepthwiseConv2dNativeAttr) (output tf.Output) {
+       if scope.Err() != nil {
+               return
+       }
+       attrs := map[string]interface{}{"strides": strides, "padding": padding}
+       for _, a := range optional {
+               a(attrs)
+       }
+       opspec := tf.OpSpec{
+               Type: "DepthwiseConv2dNative",
+               Input: []tf.Input{
+                       input, filter,
+               },
+               Attrs: attrs,
+       }
+       op := scope.AddOperation(opspec)
+       return op.Output(0)
+}
+
 // Computes the gradients of 3-D convolution with respect to the input.
 //
 // DEPRECATED at GraphDef version 10: Use Conv3DBackpropInputV2
@@ -22159,6 +22180,47 @@ func FakeQuantWithMinMaxArgsGradient(scope *Scope, gradients tf.Output, inputs t
        return op.Output(0)
 }
 
+// CriticalSectionOpAttr is an optional argument to CriticalSectionOp.
+type CriticalSectionOpAttr func(optionalAttr)
+
+// CriticalSectionOpContainer sets the optional container attribute to value.
+//
+// value: the container this critical section is placed in.
+// If not specified, defaults to ""
+func CriticalSectionOpContainer(value string) CriticalSectionOpAttr {
+       return func(m optionalAttr) {
+               m["container"] = value
+       }
+}
+
+// CriticalSectionOpSharedName sets the optional shared_name attribute to value.
+//
+// value: the name by which this critical section is referred to.
+// If not specified, defaults to ""
+func CriticalSectionOpSharedName(value string) CriticalSectionOpAttr {
+       return func(m optionalAttr) {
+               m["shared_name"] = value
+       }
+}
+
+// Creates a handle to a CriticalSection resource.
+func CriticalSectionOp(scope *Scope, optional ...CriticalSectionOpAttr) (resource tf.Output) {
+       if scope.Err() != nil {
+               return
+       }
+       attrs := map[string]interface{}{}
+       for _, a := range optional {
+               a(attrs)
+       }
+       opspec := tf.OpSpec{
+               Type: "CriticalSectionOp",
+
+               Attrs: attrs,
+       }
+       op := scope.AddOperation(opspec)
+       return op.Output(0)
+}
+
 // Computes gradients of the maxpooling function.
 //
 // Arguments:
@@ -28278,24 +28340,3 @@ func SerializeSparse(scope *Scope, sparse_indices tf.Output, sparse_values tf.Ou
        op := scope.AddOperation(opspec)
        return op.Output(0)
 }
-
-// Table initializer that takes two tensors for keys and values respectively.
-//
-// Arguments:
-//     table_handle: Handle to a table which will be initialized.
-//     keys: Keys of type Tkey.
-//     values: Values of type Tval.
-//
-// Returns the created operation.
-func InitializeTableV2(scope *Scope, table_handle tf.Output, keys tf.Output, values tf.Output) (o *tf.Operation) {
-       if scope.Err() != nil {
-               return
-       }
-       opspec := tf.OpSpec{
-               Type: "InitializeTableV2",
-               Input: []tf.Input{
-                       table_handle, keys, values,
-               },
-       }
-       return scope.AddOperation(opspec)
-}