aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/go
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-09-13 09:29:12 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-13 09:36:37 -0700
commit010922ed915cbd613ada1ca0b6c38c3403b59d90 (patch)
tree7bee762725f3559a1cb8aadb5b984526e4a77935 /tensorflow/go
parentc8a6131e9f40cc8b5db96e3098a7680e16b7d289 (diff)
Go: Update generated wrapper functions for TensorFlow ops.
PiperOrigin-RevId: 168549989
Diffstat (limited to 'tensorflow/go')
-rw-r--r--tensorflow/go/op/wrappers.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/tensorflow/go/op/wrappers.go b/tensorflow/go/op/wrappers.go
index 9167f60e53..1673b52289 100644
--- a/tensorflow/go/op/wrappers.go
+++ b/tensorflow/go/op/wrappers.go
@@ -7321,6 +7321,50 @@ func ResizeNearestNeighbor(scope *Scope, images tf.Output, size tf.Output, optio
return op.Output(0)
}
+// ResizeBicubicGradAttr is an optional argument to ResizeBicubicGrad.
+type ResizeBicubicGradAttr func(optionalAttr)
+
+// ResizeBicubicGradAlignCorners sets the optional align_corners attribute to value.
+//
+// value: If true, rescale grads by (orig_height - 1) / (height - 1), which
+// exactly aligns the 4 corners of grads and original_image. If false, rescale by
+// orig_height / height. Treat similarly the width dimension.
+// If not specified, defaults to false
+func ResizeBicubicGradAlignCorners(value bool) ResizeBicubicGradAttr {
+ return func(m optionalAttr) {
+ m["align_corners"] = value
+ }
+}
+
+// Computes the gradient of bicubic interpolation.
+//
+// Arguments:
+// grads: 4-D with shape `[batch, height, width, channels]`.
+// original_image: 4-D with shape `[batch, orig_height, orig_width, channels]`,
+// The image tensor that was resized.
+//
+// Returns 4-D with shape `[batch, orig_height, orig_width, channels]`.
+// Gradients with respect to the input image. Input image must have been
+// float or double.
+func ResizeBicubicGrad(scope *Scope, grads tf.Output, original_image tf.Output, optional ...ResizeBicubicGradAttr) (output tf.Output) {
+ if scope.Err() != nil {
+ return
+ }
+ attrs := map[string]interface{}{}
+ for _, a := range optional {
+ a(attrs)
+ }
+ opspec := tf.OpSpec{
+ Type: "ResizeBicubicGrad",
+ Input: []tf.Input{
+ grads, original_image,
+ },
+ Attrs: attrs,
+ }
+ op := scope.AddOperation(opspec)
+ return op.Output(0)
+}
+
// SummaryWriterAttr is an optional argument to SummaryWriter.
type SummaryWriterAttr func(optionalAttr)