Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::OnesLike
#include <array_ops.h>
Returns a tensor of ones with the same shape and type as x.
Summary
Args:
- scope: A Scope object
- x: a tensor of type T.
Returns:
Output
: a tensor of the same shape and type as x but filled with ones.
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. 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::OnesLike Class Reference\n\ntensorflow::ops::OnesLike\n=========================\n\n`#include \u003carray_ops.h\u003e`\n\nReturns a tensor of ones with the same shape and type as x.\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- x: a tensor of type T.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): a tensor of the same shape and type as x but filled with ones.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [OnesLike](#classtensorflow_1_1ops_1_1_ones_like_1a9ce5ff05ed7a04ebf915963d1d8435f7)`(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)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_ones_like_1ac15e18a4a512477f8e10e519abfcd6b7) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_ones_like_1ac6af054ea600a2d677e11ec5900b7ee4) | `::`[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_ones_like_1a53d2c8964e88803f776b16e1df73c514)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_ones_like_1a775247133ef103fc360424785831c02b)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_ones_like_1a321015b1e5fdb2859fc8126f97dc2b12)`() const ` | |\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### OnesLike\n\n```gdscript\n OnesLike(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x\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```"]]