Merge pull request #36325 from gaurav1086:TensorShapeUtils_IsScalar_twice

PiperOrigin-RevId: 293435810
Change-Id: Ifb55b35e7f8648e3d775d674307d7502cf6edcc6
This commit is contained in:
TensorFlower Gardener 2020-02-05 13:25:57 -08:00
commit 012bf08a6e

View File

@ -124,8 +124,7 @@ class ScatterUpdateOp : public OpKernel {
auto indices_flat = indices.flat<Index>(); auto indices_flat = indices.flat<Index>();
auto params_flat = params.flat_outer_dims<T>(); auto params_flat = params.flat_outer_dims<T>();
if (TensorShapeUtils::IsScalar(updates.shape()) || if (TensorShapeUtils::IsScalar(updates.shape())) {
TensorShapeUtils::IsScalar(updates.shape())) {
const auto update = updates.scalar<T>(); const auto update = updates.scalar<T>();
functor::ScatterScalarFunctor<Device, T, Index, op> functor; functor::ScatterScalarFunctor<Device, T, Index, op> functor;
const Index bad_i = functor(c, c->template eigen_device<Device>(), const Index bad_i = functor(c, c->template eigen_device<Device>(),