# tf_agents.trajectories.termination

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/trajectories/time_step.py#L285-L345) |

Returns a `TimeStep` with `step_type` set to [`StepType.LAST`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/StepType#LAST).

#### View aliases


**Main aliases**

[`tf_agents.trajectories.time_step.termination`](https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/termination)

<br />

    tf_agents.trajectories.termination(
        observation: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/NestedTensorOrArray,
        reward: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/NestedTensorOrArray,
        outer_dims: Optional[types.Shape] = None
    ) -> https://www.tensorflow.org/agents/api_docs/python/tf_agents/trajectories/TimeStep

### Used in the notebooks

| Used in the tutorials |
|---|
| - [Environments](https://www.tensorflow.org/agents/tutorials/2_environments_tutorial) - [Tutorial on Multi Armed Bandits in TF-Agents](https://www.tensorflow.org/agents/tutorials/bandits_tutorial) |

<br />

<br />

<br />

| ## Args ||
|---|---|
| `observation` | A NumPy array, tensor, or a nested dict, list or tuple of arrays or tensors. |
| `reward` | A NumPy array, tensor, or a nested dict, list or tuple of arrays or tensors. |
| `outer_dims` | (optional) If provided, it will be used to determine the batch dimensions. If not, the batch dimensions will be inferred by reward's shape. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `TimeStep`. ||

<br />