# tff.Value

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

A generic base class for values that appear in TFF computations.

Inherits From: [`TypedObject`](https://www.tensorflow.org/federated/api_docs/python/tff/TypedObject)

    tff.Value(
        comp: https://www.tensorflow.org/federated/api_docs/python/tff/framework/ComputationBuildingBlock
    )

If the value in this class is of `StructType` or `FederatedType` containing a
`StructType`, the inner fields can be accessed by name
(e.g. `y = my_value_impl.y`).

<br />

<br />

<br />

| ## Args ||
|---|---|
| `comp` | An instance of building_blocks.ComputationBuildingBlock that contains the logic that computes this value. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `comp` | <br /> <br /> |
| `type_signature` | Returns the TFF type of this object (an instance of [`tff.Type`](https://www.tensorflow.org/federated/api_docs/python/tff/types/Type)). |

<br />

## Methods

### `__bool__`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    __bool__()

### `__call__`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    __call__(
        *args, **kwargs
    )

Call self as a function.

### `__getitem__`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    __getitem__(
        key: Union[int, str, slice]
    )

### `__iter__`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    __iter__()

### `__len__`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    __len__()