# tf.raw_ops.Slice

<br />

Return a slice from 'input'.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.Slice`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/Slice)

<br />

    tf.raw_ops.Slice(
        input, begin, size, name=None
    )

The output tensor is a tensor with dimensions described by 'size'
whose values are extracted from 'input' starting at the offsets in
'begin'.

*Requirements*:
0 \<= begin\[i\] \<= begin\[i\] + size\[i\] \<= Di for i in \[0, n)

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input` | A `Tensor`. |
| `begin` | A `Tensor`. Must be one of the following types: `int32`, `int64`. begin\[i\] specifies the offset into the 'i'th dimension of 'input' to slice from. |
| `size` | A `Tensor`. Must have the same type as `begin`. size\[i\] specifies the number of elements of the 'i'th dimension of 'input' to slice. If size\[i\] is -1, all remaining elements in dimension i are included in the slice (i.e. this is equivalent to setting size\[i\] = input.dim_size(i) - begin\[i\]). |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same type as `input`. ||

<br />