aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels
diff options
context:
space:
mode:
authorGravatar Yuefeng Zhou <yuefengz@google.com>2018-10-09 09:32:50 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-09 09:44:34 -0700
commit3e1a0792fb593953860162d57320c8602fd199eb (patch)
tree472db16bea0c18741ddc311f321305c1265c611f /tensorflow/core/kernels
parent87d8055c74a65ec9fb2a13f38e6e2c5d30b7e2e4 (diff)
Create SDCAOptimizerV2 op to fix the "adaptative" typo.
PiperOrigin-RevId: 216370193
Diffstat (limited to 'tensorflow/core/kernels')
-rw-r--r--tensorflow/core/kernels/sdca_ops.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/core/kernels/sdca_ops.cc b/tensorflow/core/kernels/sdca_ops.cc
index 3bd4168dc7..d0e0b15da7 100644
--- a/tensorflow/core/kernels/sdca_ops.cc
+++ b/tensorflow/core/kernels/sdca_ops.cc
@@ -83,7 +83,11 @@ struct ComputeOptions {
context, false,
errors::InvalidArgument("Unsupported loss type: ", loss_type));
}
- OP_REQUIRES_OK(context, context->GetAttr("adaptative", &adaptive));
+ auto s = context->GetAttr("adaptative", &adaptive);
+ if (!s.ok()) {
+ s = context->GetAttr("adaptive", &adaptive);
+ }
+ OP_REQUIRES_OK(context, s);
OP_REQUIRES_OK(
context, context->GetAttr("num_sparse_features", &num_sparse_features));
OP_REQUIRES_OK(context, context->GetAttr("num_sparse_features_with_values",
@@ -245,6 +249,8 @@ class SdcaOptimizer : public OpKernel {
};
REGISTER_KERNEL_BUILDER(Name("SdcaOptimizer").Device(DEVICE_CPU),
SdcaOptimizer);
+REGISTER_KERNEL_BUILDER(Name("SdcaOptimizerV2").Device(DEVICE_CPU),
+ SdcaOptimizer);
class SdcaShrinkL1 : public OpKernel {
public: