Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::Empty
#include <array_ops.h>
Creates a tensor with the given shape.
Summary
This operation creates a tensor of shape
and dtype
.
Args:
- scope: A Scope object
- shape: 1-D. Represents the shape of the output tensor.
Optional attributes (see Attrs
):
- init: If True, initialize the returned tensor with the default value of dtype. Otherwise, the implementation is free not to initializethe tensor's content.
Returns:
Public static functions
|
Init(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
Init
Attrs Init(
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::Empty Class Reference\n\ntensorflow::ops::Empty\n======================\n\n`#include \u003carray_ops.h\u003e`\n\nCreates a tensor with the given shape.\n\nSummary\n-------\n\nThis operation creates a tensor of `shape` and `dtype`.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- shape: 1-D. Represents the shape of the output tensor.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs)):\n\n- init: If True, initialize the returned tensor with the default value of dtype. Otherwise, the implementation is free not to initializethe tensor's content.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A [Tensor](/versions/r2.14/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of type `T`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Empty](#classtensorflow_1_1ops_1_1_empty_1afbeeb90876baaa5131ccd9ae1a733689)`(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)` shape, DataType dtype)` ||\n| [Empty](#classtensorflow_1_1ops_1_1_empty_1a17ea31d51cede367a541675480d77a3f)`(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)` shape, DataType dtype, const `[Empty::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_empty_1ae377e8630513546e65d719d56ecfe136) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_empty_1a9c7d05401a0aa67f82fe592682f0bc15) | `::`[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_empty_1a4fdbda6ce5b2f476acc70ada9df3eaa2)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_empty_1ac54e9b4ae90bf596166c770dc6d22ce5)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_empty_1a9ae3f6fbe95cde1fcec65896b5397511)`() const ` | |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [Init](#classtensorflow_1_1ops_1_1_empty_1ac0b3b4819671ba0dd14c7ca6c1bacae4)`(bool x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/empty/attrs#structtensorflow_1_1ops_1_1_empty_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::Empty::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/empty/attrs) | Optional attribute setters for [Empty](/versions/r2.14/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty). |\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### Empty\n\n```gdscript\n Empty(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n DataType dtype\n)\n``` \n\n### Empty\n\n```gdscript\n Empty(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input shape,\n DataType dtype,\n const Empty::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### Init\n\n```text\nAttrs Init(\n bool x\n)\n```"]]