diff options
author | 2015-11-16 11:11:36 -0800 | |
---|---|---|
committer | 2015-11-16 11:11:36 -0800 | |
commit | 56313def004795f75ef8281a0294c958d28f1e06 (patch) | |
tree | b1574e8fa6fdeb6f7155511d8e4eccda85f3b0e1 /tensorflow/core/kernels/reverse_op.cc | |
parent | cb9fa5fc9de9f3fc97c15bbcce252d7d7fdcb73b (diff) |
TensorFlow: Doc and linter fixes, some additional tests and
error handling, updates to website.
Changes:
- Removes redundant reshape from image models by @mrry
- Default TensorBoard to localhost by @danmane
- Reformatting of tensorflow/core by @josh11b
- Make tutorials backwards compatible to 0.5.0 by @girving
- Improve print documentation (md files not updated).
- Add proper scrolling to sitemap by @martinwicke
Base CL: 107956254
Diffstat (limited to 'tensorflow/core/kernels/reverse_op.cc')
-rw-r--r-- | tensorflow/core/kernels/reverse_op.cc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/tensorflow/core/kernels/reverse_op.cc b/tensorflow/core/kernels/reverse_op.cc index c63dfc1e70..d759d62161 100644 --- a/tensorflow/core/kernels/reverse_op.cc +++ b/tensorflow/core/kernels/reverse_op.cc @@ -2,6 +2,7 @@ #define EIGEN_USE_THREADS #include <memory> +#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/register_types.h" #include "tensorflow/core/framework/types.h" @@ -10,7 +11,6 @@ #include "tensorflow/core/public/status.h" #include "tensorflow/core/public/tensor.h" #include "tensorflow/core/public/tensor_shape.h" -#include "third_party/eigen3/unsupported/Eigen/CXX11/Tensor" namespace tensorflow { @@ -38,13 +38,15 @@ class ReverseOp : public OpKernel { errors::InvalidArgument("'dims' must be 1-dimension, not ", dims.dims())); - OP_REQUIRES(context, input_dims == dims.dim_size(0), - errors::InvalidArgument( - "'dims' must have the same number of values as 'input' has " - "dimensions. 'input' has ", input_dims, "'dims' has ", - dims.dim_size(0), " values")); - OP_REQUIRES(context, input_dims <= 8, errors::Unimplemented( - "reverse is not implemented for tensors of rank > 8.")); + OP_REQUIRES( + context, input_dims == dims.dim_size(0), + errors::InvalidArgument( + "'dims' must have the same number of values as 'input' has " + "dimensions. 'input' has ", + input_dims, "'dims' has ", dims.dim_size(0), " values")); + OP_REQUIRES(context, input_dims <= 8, + errors::Unimplemented( + "reverse is not implemented for tensors of rank > 8.")); Tensor* output = nullptr; OP_REQUIRES_OK(context, |