# tensorflow::ops::BatchMatMulV2

`#include <math_ops.h>`

Multiplies slices of two tensors in batches.

## Summary

Multiplies all slices of `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor``x` and `y` (each slice can be viewed as an element of a batch), and arranges the individual results in a single output tensor of the same batch size. Each of the individual slices can optionally be adjointed (to adjoint a matrix means to transpose and conjugate it) before multiplication by setting the `adj_x` or `adj_y` flag to `True`, which are by default `False`.

The input tensors `x` and `y` are 2-D or higher with shape `[..., r_x, c_x]` and `[..., r_y, c_y]`.

The output tensor is 2-D or higher with shape `[..., r_o, c_o]`, where:

```
r_o = c_x if adj_x else r_x
c_o = r_y if adj_y else c_y
```

<br />

It is computed as:

```
output[..., :, :] = matrix(x[..., :, :]) * matrix(y[..., :, :])
```

<br />

*NOTE*: `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2` supports broadcasting in the batch dimensions. More about broadcasting [here](http://docs.scipy.org/doc/numpy/user/basics.broadcasting.html).

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- x: 2-D or higher with shape `[..., r_x, c_x]`.
- y: 2-D or higher with shape `[..., r_y, c_y]`.

<br />

Optional attributes (see `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul-v2/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_v2_1_1_attrs`):

- adj_x: If `True`, adjoint the slices of `x`. Defaults to `False`.
- adj_y: If `True`, adjoint the slices of `y`. Defaults to `False`.

<br />

Returns:

- `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: 3-D or higher with shape `[..., r_o, c_o]`

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a72c2f4ad83e7c11063fadaf661ec6d54(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input x, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input y)` ||
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a6990e4599f21b54bb5f18572d215fcb1(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input x, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input y, const https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul-v2/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_v2_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a6b83c78f1764f9f38262039680f75f48` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1ac477c6e218d7285987ba896599db161e` | `::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a11c6e4f79b4fbd6ce36ecbc3c84c1e6e() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1af48144aa8d3a20f660281a87abccb7b8() const ` | ` `` ` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a807920b129cb268198f13fa48d55d9b7() const ` | ` `` ` |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a8f28eaff740f7852929cd5e69f82196d(bool x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul-v2/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_v2_1_1_attrs` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2_1a76e0c3ea406e4d375518505611ff3358(bool x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul-v2/attrs#structtensorflow_1_1ops_1_1_batch_mat_mul_v2_1_1_attrs` |

| ### Structs ||
|---|---|
| [tensorflow::ops::BatchMatMulV2::Attrs](https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/batch-mat-mul-v2/attrs) | Optional attribute setters for [BatchMatMulV2](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/batch-mat-mul-v2#classtensorflow_1_1ops_1_1_batch_mat_mul_v2). |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### BatchMatMulV2

```
 BatchMatMulV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x,
  ::tensorflow::Input y
)
```

### BatchMatMulV2

```
 BatchMatMulV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x,
  ::tensorflow::Input y,
  const BatchMatMulV2::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### AdjX

```
Attrs AdjX(
  bool x
)
```

### AdjY

```
Attrs AdjY(
  bool x
)
```