diff options
author | Todd Wang <toddw@google.com> | 2018-09-25 19:13:30 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-25 19:19:06 -0700 |
commit | 3f4b8c138165cc9deb0ed931c5a6bb3d8ab556f0 (patch) | |
tree | 71b16ea76026e41164a3d68a34f71c53cd11a5c0 /tensorflow/core/ops | |
parent | 8adf133448f822fcb866d69ea9d046512836834e (diff) |
Remove integer dtypes from Soft{plus,sign} OpDefs.
These ops were never intended to support integer dtypes, and the
OpKernels have already been removed in a previous patch.
PiperOrigin-RevId: 214542750
Diffstat (limited to 'tensorflow/core/ops')
-rw-r--r-- | tensorflow/core/ops/compat/ops_history.v1.pbtxt | 100 | ||||
-rw-r--r-- | tensorflow/core/ops/nn_ops.cc | 10 | ||||
-rw-r--r-- | tensorflow/core/ops/ops.pbtxt | 48 |
3 files changed, 112 insertions, 46 deletions
diff --git a/tensorflow/core/ops/compat/ops_history.v1.pbtxt b/tensorflow/core/ops/compat/ops_history.v1.pbtxt index 0ab1558613..86d4c6b421 100644 --- a/tensorflow/core/ops/compat/ops_history.v1.pbtxt +++ b/tensorflow/core/ops/compat/ops_history.v1.pbtxt @@ -60085,6 +60085,29 @@ op { } } op { + name: "Softplus" + input_arg { + name: "features" + type_attr: "T" + } + output_arg { + name: "activations" + type_attr: "T" + } + attr { + name: "T" + type: "type" + allowed_values { + list { + type: DT_HALF + type: DT_BFLOAT16 + type: DT_FLOAT + type: DT_DOUBLE + } + } + } +} +op { name: "SoftplusGrad" input_arg { name: "gradients" @@ -60221,6 +60244,33 @@ op { } } op { + name: "SoftplusGrad" + input_arg { + name: "gradients" + type_attr: "T" + } + input_arg { + name: "features" + type_attr: "T" + } + output_arg { + name: "backprops" + type_attr: "T" + } + attr { + name: "T" + type: "type" + allowed_values { + list { + type: DT_HALF + type: DT_BFLOAT16 + type: DT_FLOAT + type: DT_DOUBLE + } + } + } +} +op { name: "Softsign" input_arg { name: "features" @@ -60341,6 +60391,29 @@ op { } } op { + name: "Softsign" + input_arg { + name: "features" + type_attr: "T" + } + output_arg { + name: "activations" + type_attr: "T" + } + attr { + name: "T" + type: "type" + allowed_values { + list { + type: DT_HALF + type: DT_BFLOAT16 + type: DT_FLOAT + type: DT_DOUBLE + } + } + } +} +op { name: "SoftsignGrad" input_arg { name: "gradients" @@ -60477,6 +60550,33 @@ op { } } op { + name: "SoftsignGrad" + input_arg { + name: "gradients" + type_attr: "T" + } + input_arg { + name: "features" + type_attr: "T" + } + output_arg { + name: "backprops" + type_attr: "T" + } + attr { + name: "T" + type: "type" + allowed_values { + list { + type: DT_HALF + type: DT_BFLOAT16 + type: DT_FLOAT + type: DT_DOUBLE + } + } + } +} +op { name: "SpaceToBatch" input_arg { name: "input" diff --git a/tensorflow/core/ops/nn_ops.cc b/tensorflow/core/ops/nn_ops.cc index 2485fa4717..dc39996017 100644 --- a/tensorflow/core/ops/nn_ops.cc +++ b/tensorflow/core/ops/nn_ops.cc @@ -1009,32 +1009,30 @@ REGISTER_OP("SeluGrad") .Attr("T: {half, bfloat16, float, double}") .SetShapeFn(shape_inference::MergeBothInputsShapeFn); -// TODO(b/111515541): change T to {half, bfloat16, float, double} REGISTER_OP("Softplus") .Input("features: T") .Output("activations: T") - .Attr("T: realnumbertype") + .Attr("T: {half, bfloat16, float, double}") .SetShapeFn(shape_inference::UnchangedShape); REGISTER_OP("SoftplusGrad") .Input("gradients: T") .Input("features: T") .Output("backprops: T") - .Attr("T: realnumbertype") + .Attr("T: {half, bfloat16, float, double}") .SetShapeFn(shape_inference::MergeBothInputsShapeFn); -// TODO(b/111515541): change T to {half, bfloat16, float, double} REGISTER_OP("Softsign") .Input("features: T") .Output("activations: T") - .Attr("T: realnumbertype") + .Attr("T: {half, bfloat16, float, double}") .SetShapeFn(shape_inference::UnchangedShape); REGISTER_OP("SoftsignGrad") .Input("gradients: T") .Input("features: T") .Output("backprops: T") - .Attr("T: realnumbertype") + .Attr("T: {half, bfloat16, float, double}") .SetShapeFn(shape_inference::MergeBothInputsShapeFn); // -------------------------------------------------------------------------- diff --git a/tensorflow/core/ops/ops.pbtxt b/tensorflow/core/ops/ops.pbtxt index 3b89fb76ea..bdded2d894 100644 --- a/tensorflow/core/ops/ops.pbtxt +++ b/tensorflow/core/ops/ops.pbtxt @@ -28714,18 +28714,10 @@ op { type: "type" allowed_values { list { + type: DT_HALF + type: DT_BFLOAT16 type: DT_FLOAT type: DT_DOUBLE - type: DT_INT32 - type: DT_UINT8 - type: DT_INT16 - type: DT_INT8 - type: DT_INT64 - type: DT_BFLOAT16 - type: DT_UINT16 - type: DT_HALF - type: DT_UINT32 - type: DT_UINT64 } } } @@ -28749,18 +28741,10 @@ op { type: "type" allowed_values { list { + type: DT_HALF + type: DT_BFLOAT16 type: DT_FLOAT type: DT_DOUBLE - type: DT_INT32 - type: DT_UINT8 - type: DT_INT16 - type: DT_INT8 - type: DT_INT64 - type: DT_BFLOAT16 - type: DT_UINT16 - type: DT_HALF - type: DT_UINT32 - type: DT_UINT64 } } } @@ -28780,18 +28764,10 @@ op { type: "type" allowed_values { list { + type: DT_HALF + type: DT_BFLOAT16 type: DT_FLOAT type: DT_DOUBLE - type: DT_INT32 - type: DT_UINT8 - type: DT_INT16 - type: DT_INT8 - type: DT_INT64 - type: DT_BFLOAT16 - type: DT_UINT16 - type: DT_HALF - type: DT_UINT32 - type: DT_UINT64 } } } @@ -28815,18 +28791,10 @@ op { type: "type" allowed_values { list { + type: DT_HALF + type: DT_BFLOAT16 type: DT_FLOAT type: DT_DOUBLE - type: DT_INT32 - type: DT_UINT8 - type: DT_INT16 - type: DT_INT8 - type: DT_INT64 - type: DT_BFLOAT16 - type: DT_UINT16 - type: DT_HALF - type: DT_UINT32 - type: DT_UINT64 } } } |