tf.guarantee_const
Stay organized with collections
Save and categorize content based on your preferences.
Gives a guarantee to the TF runtime that the input tensor is a constant.
tf.guarantee_const(
input, name=None
)
The runtime is then free to make optimizations based on this.
Only accepts value typed tensors as inputs and rejects resource variable handles
as input.
Returns the input tensor without modification.
Args |
input
|
A Tensor .
|
name
|
A name for the operation (optional).
|
Returns |
A Tensor . Has the same type as input .
|
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.guarantee_const\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------|\n| [TensorFlow 1 version](/versions/r1.15/api_docs/python/tf/guarantee_const) |\n\nGives a guarantee to the TF runtime that the input tensor is a constant.\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.guarantee_const`](/api_docs/python/tf/guarantee_const)\n\n\u003cbr /\u003e\n\n tf.guarantee_const(\n input, name=None\n )\n\nThe runtime is then free to make optimizations based on this.\n\nOnly accepts value typed tensors as inputs and rejects resource variable handles\nas input.\n\nReturns the input tensor without modification.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|---------|--------------------------------------|\n| `input` | A `Tensor`. |\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`. Has the same type as `input`. ||\n\n\u003cbr /\u003e"]]