aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/image
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-01-30 10:43:03 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-30 12:33:54 -0800
commit4463d105a8a4a83642b9709ba79310e8f4ddf577 (patch)
tree240e9a0a9a6b9ad956c704776a33126ba00cbfe8 /tensorflow/contrib/image
parent8f0e7207774279f4fe50f4d6c4fbd576e2941463 (diff)
Cleanup: Ran clang-format on all *.{cc,h} files in tensorflow/contrib/.../*.{hh,c}.
PiperOrigin-RevId: 183855242
Diffstat (limited to 'tensorflow/contrib/image')
-rw-r--r--tensorflow/contrib/image/kernels/image_ops.cc13
-rwxr-xr-xtensorflow/contrib/image/kernels/single_image_random_dot_stereograms_ops.cc4
-rwxr-xr-xtensorflow/contrib/image/ops/single_image_random_dot_stereograms_ops.cc4
3 files changed, 12 insertions, 9 deletions
diff --git a/tensorflow/contrib/image/kernels/image_ops.cc b/tensorflow/contrib/image/kernels/image_ops.cc
index 6adf837ca0..c2e32da133 100644
--- a/tensorflow/contrib/image/kernels/image_ops.cc
+++ b/tensorflow/contrib/image/kernels/image_ops.cc
@@ -43,9 +43,9 @@ template struct FillProjectiveTransform<CPUDevice, double>;
typedef Eigen::ThreadPoolDevice CPUDevice;
using functor::FillProjectiveTransform;
+using generator::Interpolation;
using generator::INTERPOLATION_BILINEAR;
using generator::INTERPOLATION_NEAREST;
-using generator::Interpolation;
using generator::ProjectiveGenerator;
template <typename Device, typename T>
@@ -72,11 +72,12 @@ class ImageProjectiveTransform : public OpKernel {
const Tensor& transform_t = ctx->input(1);
OP_REQUIRES(ctx, images_t.shape().dims() == 4,
errors::InvalidArgument("Input images must have rank 4"));
- OP_REQUIRES(ctx, (TensorShapeUtils::IsMatrix(transform_t.shape()) &&
- (transform_t.dim_size(0) == images_t.dim_size(0) ||
- transform_t.dim_size(0) == 1) &&
- transform_t.dim_size(1) ==
- ProjectiveGenerator<Device, T>::kNumParameters),
+ OP_REQUIRES(ctx,
+ (TensorShapeUtils::IsMatrix(transform_t.shape()) &&
+ (transform_t.dim_size(0) == images_t.dim_size(0) ||
+ transform_t.dim_size(0) == 1) &&
+ transform_t.dim_size(1) ==
+ ProjectiveGenerator<Device, T>::kNumParameters),
errors::InvalidArgument(
"Input transform should be num_images x 8 or 1 x 8"));
auto images = images_t.tensor<T, 4>();
diff --git a/tensorflow/contrib/image/kernels/single_image_random_dot_stereograms_ops.cc b/tensorflow/contrib/image/kernels/single_image_random_dot_stereograms_ops.cc
index 9f0bf37aed..8f9a5c2803 100755
--- a/tensorflow/contrib/image/kernels/single_image_random_dot_stereograms_ops.cc
+++ b/tensorflow/contrib/image/kernels/single_image_random_dot_stereograms_ops.cc
@@ -143,8 +143,8 @@ class SingleImageRandomDotStereogramsOp : public OpKernel {
}
data_box_left = deltaX_border_image / 2; // Center DATA in X dimension
- data_box_width = data_Xwindow; // width of scan line
- data_box_height = data_Ywindow; // hight of image
+ data_box_width = data_Xwindow; // width of scan line
+ data_box_height = data_Ywindow; // hight of image
const T* inputZ = input_tensor.flat<T>().data(); // Flatten input Z buffer
diff --git a/tensorflow/contrib/image/ops/single_image_random_dot_stereograms_ops.cc b/tensorflow/contrib/image/ops/single_image_random_dot_stereograms_ops.cc
index 1f41f243f2..8139d4272d 100755
--- a/tensorflow/contrib/image/ops/single_image_random_dot_stereograms_ops.cc
+++ b/tensorflow/contrib/image/ops/single_image_random_dot_stereograms_ops.cc
@@ -58,7 +58,9 @@ REGISTER_OP("SingleImageRandomDotStereograms")
int colors;
TF_RETURN_IF_ERROR(c->GetAttr("number_colors", &colors));
- c->set_output(0, c->MakeShape({y_dim, x_dim, colors > 256? c->MakeDim(3) : c->MakeDim(1)}));
+ c->set_output(
+ 0, c->MakeShape(
+ {y_dim, x_dim, colors > 256 ? c->MakeDim(3) : c->MakeDim(1)}));
return Status::OK();
})
.Doc(R"doc(