tf.raw_ops.Cast
Stay organized with collections
Save and categorize content based on your preferences.
Cast x of type SrcT to y of DstT.
tf.raw_ops.Cast(
x, DstT, Truncate=False, name=None
)
Args |
x
|
A Tensor .
|
DstT
|
A tf.DType .
|
Truncate
|
An optional bool . Defaults to False .
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor of type DstT .
|
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-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.raw_ops.Cast\n\n\u003cbr /\u003e\n\nCast x of type SrcT to y of DstT.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.Cast`](/api_docs/python/tf/raw_ops/Cast)\n\n\u003cbr /\u003e\n\n tf.raw_ops.Cast(\n x, DstT, Truncate=False, name=None\n )\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------|------------------------------------------|\n| `x` | A `Tensor`. |\n| `DstT` | A [`tf.DType`](../../tf/dtypes/DType). |\n| `Truncate` | An optional `bool`. Defaults to `False`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` of type `DstT`. ||\n\n\u003cbr /\u003e"]]