Dot¶
Dot // Generalized dot product operation
Description¶
Generalized dot product operation, including scalartensor product, matrixvector product, and matrix multiplication.
A few common cases are as follows:
 If \(m = 0\) and \(n = 1\) or \(p = 1\), the operation is a scalartensor product.
 If \(m = 1\), \(n = 2\), and \(p = 1\), the operation is a matrixvector product.
 If \(m = 1\) and \(n = p = 2\), the operation is a matrix multiplication.
Inputs¶
Name  Element Type  Shape 

arg0 
any  \((i_1,\dots,i_n,j_1,\dots,j_m)\) 
arg1 
same as arg0 
\((j_1,\ldots,j_m,k_1,\dots,k_p)\) 
Attributes¶
Name  

reduction_axes_count  size_t 
The number of axes to reduce through dotproduct (corresponds to \(m\) in the formulas above) 
Outputs¶
Name  Element Type  Shape 

output 
same as arg0 
\((i_1,\ldots,i_n,k_1,\dots,k_p)\) 
Mathematical Definition¶
Backprop¶
To be documented.
C++ Interface¶

class
Dot
: public ngraph::op::Op¶ Generalized dot product operation, including scalartensor product, matrixvector product, and matrix multiplication.
Public Functions

const NodeTypeInfo &
get_type_info
() const¶ Returns the NodeTypeInfo for the node’s class. During transition to type_info, returns a dummy type_info for Node if the class has not been updated yet.

Dot
()¶ Constructs a dot product operation.

Dot
(const Output<Node> &arg0, const Output<Node> &arg1, size_t reduction_axes_count, bool has_reduction_axes_count = true)¶ Constructs a dot product operation.
 Parameters
arg0
: The node producing the first argument.arg1
: The node producing the second argument.reduction_axes_count
: The number of axes to dot.

Dot
(const Output<Node> &arg0, const Output<Node> &arg1)¶ Constructs a dot product operation with default dotaxis selection depending on the inputs.
If
arg0
orarg1
is a scalar, there are no dotaxes. Else, there is one dotaxis.(Note that in particular, this results in scalartensor products where one or the other argument is a scalar, a matrixvector products where
arg0
is a matrix andarg1
is a vector, and a matrix multiplication wherearg0
andarg1
are both matrices.) Parameters
arg0
: The node producing the first argument.arg1
: The node producing the second argument.

void
validate_and_infer_types
()¶ Throws if the node is invalid.

const NodeTypeInfo &