Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::
ops::
Prod
#include <math_ops.h>
Computes the product of elements across dimensions of a tensor.
Summary
Reduces
input
along the dimensions given in
axis
. Unless
keep_dims
is true, the rank of the tensor is reduced by 1 for each entry in
axis
. If
keep_dims
is true, the reduced dimensions are retained with length 1.
Args:
-
scope: A
Scope
object
-
input: The tensor to reduce.
-
axis: The dimensions to reduce. Must be in the range
[-rank(input), rank(input))
.
Optional attributes (see
Attrs
):
-
keep_dims: If true, retain reduced dimensions with length 1.
Returns:
Aliases:
Public static functions
|
KeepDims
(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
KeepDims
Attrs KeepDims(
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 2021-05-14 UTC.
[null,null,["Last updated 2021-05-14 UTC."],[],[],null,["# tensorflow::ops::Prod Class Reference\n\ntensorflow::\nops::\nProd\n=======================\n\n`\n#include \u003cmath_ops.h\u003e\n`\n\n\nComputes the product of elements across dimensions of a tensor.\n\nSummary\n-------\n\n\nReduces\n`\ninput\n`\nalong the dimensions given in\n`\naxis\n`\n. Unless\n`\nkeep_dims\n`\nis true, the rank of the tensor is reduced by 1 for each entry in\n`\naxis\n`\n. If\n`\nkeep_dims\n`\nis true, the reduced dimensions are retained with length 1.\n\n\nArgs:\n\n- scope: A [Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: The tensor to reduce.\n- axis: The dimensions to reduce. Must be in the range `\n [-rank(input), rank(input))\n ` .\n\n\u003cbr /\u003e\n\n\nOptional attributes (see\n`\n`[Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/prod/attrs#structtensorflow_1_1ops_1_1_prod_1_1_attrs)`\n`\n):\n\n- keep_dims: If true, retain reduced dimensions with length 1.\n\n\u003cbr /\u003e\n\n\nReturns:\n\n- `\n `[Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)`\n ` : The reduced tensor.\n\n\u003cbr /\u003e\n\n\nAliases:\n\n- ReduceProd\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| ` `[Prod](#classtensorflow_1_1ops_1_1_prod_1a29b256476990c7cae35fac4f60058d74)` (const :: `[tensorflow::Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` axis) ` ||\n| ` `[Prod](#classtensorflow_1_1ops_1_1_prod_1acef934b4655671a548f08b61cc12ff40)` (const :: `[tensorflow::Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` axis, const `[Prod::Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/prod/attrs#structtensorflow_1_1ops_1_1_prod_1_1_attrs)` & attrs) ` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| ` `[operation](#classtensorflow_1_1ops_1_1_prod_1ac0d39f84b4d4203b6b9298471f79fcb0)` ` | ` `[Operation](/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)` ` |\n| ` `[output](#classtensorflow_1_1ops_1_1_prod_1a637cd7559f207583c5833a4b2e4fbdd5)` ` | ` :: `[tensorflow::Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)` ` |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------|--------------------------|\n| ` `[node](#classtensorflow_1_1ops_1_1_prod_1a5d7164d3fe0e3836e18d424e98dc1b27)` () const ` | ` ::tensorflow::Node * ` |\n| ` `[operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_prod_1a88ec74f3d3ad9bdf6c9adacb5666063b)` () const ` | ` ` |\n| ` `[operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_prod_1acf8469d69e8eb65e2a1a248f16a30015)` () const ` | ` ` |\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|\n| ` `[KeepDims](#classtensorflow_1_1ops_1_1_prod_1a4e345cf4be9273e418f3b64ca5a52a7a)` (bool x) ` | ` `[Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/prod/attrs#structtensorflow_1_1ops_1_1_prod_1_1_attrs)` ` |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow:: ops:: Prod:: Attrs](/versions/r2.5/api_docs/cc/struct/tensorflow/ops/prod/attrs) | Optional attribute setters for [Prod](/versions/r2.5/api_docs/cc/class/tensorflow/ops/prod#classtensorflow_1_1ops_1_1_prod) . |\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### Prod\n\n```gdscript\n Prod(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input axis\n)\n``` \n\n### Prod\n\n```gdscript\n Prod(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input,\n ::tensorflow::Input axis,\n const Prod::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### KeepDims\n\n```text\nAttrs KeepDims(\n bool x\n)\n```"]]