# tensorflow::ops::SaveV2 Class Reference

# tensorflow::
ops::
SaveV2

`
#include <io_ops.h>
`


Saves tensors in V2 checkpoint format.

## Summary


By default, saves the named tensors in full. If the caller wishes to save specific slices of full tensors, "shape_and_slices" should be non-empty strings and correspondingly well-formed.


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- prefix: Must have a single element. The prefix of the V2 checkpoint to which we write the tensors.
- tensor_names: shape {N}. The names of the tensors to be saved.
- shape_and_slices: shape {N}. The slice specs of the tensors to be saved. [Empty](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/empty#classtensorflow_1_1ops_1_1_empty) strings indicate that they are non-partitioned tensors.
- tensors: `
  N
  ` tensors to save.

<br />


Returns:

- the created `
  https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation
  `

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/save-v2#classtensorflow_1_1ops_1_1_save_v2_1a1ffd5c412f4b1620ffbe3c2a4a8b5f56 (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input prefix, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input tensor_names, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape_and_slices, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list tensors) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/save-v2#classtensorflow_1_1ops_1_1_save_v2_1aef163a3bab67f5acd5fade77d3998b72 ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/save-v2#classtensorflow_1_1ops_1_1_save_v2_1ae9919485ae23077f045387f5509adb41 () const ` | ` ` |

## Public attributes

### operation

```
Operation operation
```

## Public functions

### SaveV2

```
 SaveV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input prefix,
  ::tensorflow::Input tensor_names,
  ::tensorflow::Input shape_and_slices,
  ::tensorflow::InputList tensors
)
```

### operator::tensorflow::Operation

```
 operator::tensorflow::Operation() const 
```