Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::ClipByValue
#include <math_ops.h>
Clips tensor values to a specified min and max.
Summary
Given a tensor t
, this operation returns a tensor of the same type and shape as t
with its values clipped to clip_value_min
and clip_value_max
. Any values less than clip_value_min
are set to clip_value_min
. Any values greater than clip_value_max
are set to clip_value_max
.
Arguments:
- scope: A Scope object
- t: A
Tensor
.
- clip_value_min: A 0-D (scalar)
Tensor
, or a Tensor
with the same shape as t
. The minimum value to clip by.
- clip_value_max: A 0-D (scalar)
Tensor
, or a Tensor
with the same shape as t
. The maximum value to clip by.
Returns:
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.
[null,null,["Last updated 2020-04-20 UTC."],[],[],null,["# tensorflow::ops::ClipByValue Class Reference\n\ntensorflow::ops::ClipByValue\n============================\n\n`#include \u003cmath_ops.h\u003e`\n\nClips tensor values to a specified min and max.\n\nSummary\n-------\n\nGiven a tensor `t`, this operation returns a tensor of the same type and shape as `t` with its values clipped to `clip_value_min` and `clip_value_max`. [Any](/versions/r1.15/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) values less than `clip_value_min` are set to `clip_value_min`. [Any](/versions/r1.15/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) values greater than `clip_value_max` are set to `clip_value_max`.\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- t: A [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- clip_value_min: A 0-D (scalar) [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor), or a [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with the same shape as `t`. The minimum value to clip by.\n- clip_value_max: A 0-D (scalar) [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor), or a [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with the same shape as `t`. The maximum value to clip by.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A clipped [Tensor](/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with the same shape as input 't'.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ClipByValue](#classtensorflow_1_1ops_1_1_clip_by_value_1ab526bd89e515b8086815ed1ca60ee26b)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` t, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` clip_value_min, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` clip_value_max)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_clip_by_value_1a6ea3cb903878a47217c33415704ba5d0) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_clip_by_value_1aaeb2e1fae647e0a8606ada4557524321) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_clip_by_value_1a53b0735ad42735c966c3a18bd0425150)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_clip_by_value_1afb378365ea16f406988ca25a97ef57b9)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_clip_by_value_1a7cb582679c053b906ea8f0e1df01a18a)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### ClipByValue\n\n```gdscript\n ClipByValue(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input t,\n ::tensorflow::Input clip_value_min,\n ::tensorflow::Input clip_value_max\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]