diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-01-26 11:59:56 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-01-26 12:03:52 -0800 |
commit | 0f65c8f572201f8838189f3e3c3e455759112c14 (patch) | |
tree | 55d3ad38ebe720d5c3edb8d0722b55d4cd778e3e /tensorflow/core/kernels/xent_op.cc | |
parent | ff6463f4277f412b98d6e6bb1283841ff66902de (diff) |
Cleanup: Ran clang-format on all *.{cc,h} files in tensorflow/core/kernels.
PiperOrigin-RevId: 183423961
Diffstat (limited to 'tensorflow/core/kernels/xent_op.cc')
-rw-r--r-- | tensorflow/core/kernels/xent_op.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/core/kernels/xent_op.cc b/tensorflow/core/kernels/xent_op.cc index 0f8d027caa..a6a71fdfaf 100644 --- a/tensorflow/core/kernels/xent_op.cc +++ b/tensorflow/core/kernels/xent_op.cc @@ -30,7 +30,7 @@ typedef Eigen::ThreadPoolDevice CPUDevice; typedef Eigen::GpuDevice GPUDevice; #ifdef TENSORFLOW_USE_SYCL typedef Eigen::SyclDevice SYCLDevice; -#endif // TENSORFLOW_USE_SYCL +#endif // TENSORFLOW_USE_SYCL template <typename Device, typename T> class SoftmaxXentWithLogitsOp : public OpKernel { @@ -44,8 +44,8 @@ class SoftmaxXentWithLogitsOp : public OpKernel { OP_REQUIRES(context, logits_in.IsSameSize(labels_in), errors::InvalidArgument( "logits and labels must be same size: logits_size=", - logits_in.shape().DebugString(), " labels_size=", - labels_in.shape().DebugString())); + logits_in.shape().DebugString(), + " labels_size=", labels_in.shape().DebugString())); OP_REQUIRES(context, TensorShapeUtils::IsMatrix(logits_in.shape()), errors::InvalidArgument("logits must be 2-dimensional")); // As we already tested that both inputs have the same shape no need to @@ -72,7 +72,7 @@ class SoftmaxXentWithLogitsOp : public OpKernel { functor(context->eigen_device<Device>(), logits_in.matrix<T>(), labels_in.matrix<T>(), scratch.matrix<T>(), loss_out->vec<T>(), back_out->matrix<T>()); - } + } } }; @@ -87,7 +87,7 @@ struct XentFunctorBase { typename TTypes<T>::Vec loss, typename TTypes<T>::Matrix backprop) { XentEigenImpl<Device, T>::Compute(d, logits, labels, scratch, loss, - backprop); + backprop); } }; @@ -97,7 +97,7 @@ struct XentFunctor<CPUDevice, T> : XentFunctorBase<CPUDevice, T> {}; #ifdef TENSORFLOW_USE_SYCL template <typename T> struct XentFunctor<SYCLDevice, T> : XentFunctorBase<SYCLDevice, T> {}; -#endif // TENSORFLOW_USE_SYCL +#endif // TENSORFLOW_USE_SYCL } // namespace functor #define REGISTER_CPU(T) \ @@ -129,6 +129,6 @@ REGISTER_KERNEL_BUILDER(Name("SoftmaxCrossEntropyWithLogits") .Device(DEVICE_SYCL) .TypeConstraint<float>("T"), SoftmaxXentWithLogitsOp<SYCLDevice, float>); -#endif // TENSORFLOW_USE_SYCL +#endif // TENSORFLOW_USE_SYCL } // namespace tensorflow |