Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::Cast
#include <math_ops.h>
Cast x of type SrcT to y of DstT.
Summary
Args:
Returns:
Public static functions
|
Truncate(bool x)
|
|
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Truncate
Attrs Truncate(
bool x
)
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. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::Cast Class Reference\n\ntensorflow::ops::Cast\n=====================\n\n`#include \u003cmath_ops.h\u003e`\n\n[Cast](/versions/r2.14/api_docs/cc/class/tensorflow/ops/cast#classtensorflow_1_1ops_1_1_cast) x of type SrcT to y of DstT.\n\nSummary\n-------\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The y tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Cast](#classtensorflow_1_1ops_1_1_cast_1a1ea2ddf55bbf88349817577e52286be9)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, DataType DstT)` ||\n| [Cast](#classtensorflow_1_1ops_1_1_cast_1afba1205ae1b098b241ce85a885684f29)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, DataType DstT, const `[Cast::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/cast/attrs#structtensorflow_1_1ops_1_1_cast_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_cast_1a60a2a9aa4084fb48682fa96b49be65ee) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_cast_1a1ba2372688ef4f365cddcc1e06831536) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_cast_1a2ea230c53c61d5c0ddd1c36f63c151a4)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_cast_1aea4196ac1adc91b2d8938b59269c4b37)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_cast_1a4bc2cec5b6d57ad59a0e89a7f94eeda1)`() const ` | |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| [Truncate](#classtensorflow_1_1ops_1_1_cast_1a82145cd417863a5aa1a282e8db95e9cc)`(bool x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/cast/attrs#structtensorflow_1_1ops_1_1_cast_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Cast::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/cast/attrs) | Optional attribute setters for [Cast](/versions/r2.14/api_docs/cc/class/tensorflow/ops/cast#classtensorflow_1_1ops_1_1_cast). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### y\n\n```text\n::tensorflow::Output y\n``` \n\nPublic functions\n----------------\n\n### Cast\n\n```gdscript\n Cast(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n DataType DstT\n)\n``` \n\n### Cast\n\n```gdscript\n Cast(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n DataType DstT,\n const Cast::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### Truncate\n\n```text\nAttrs Truncate(\n bool x\n)\n```"]]