# tff.framework.ConcreteComputation

<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 representation of a `pb.Computation` in the [`tff.Computation`](https://www.tensorflow.org/federated/api_docs/python/tff/Computation) interface.

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

    tff.framework.ConcreteComputation(
        *,
        computation_proto: pb.Computation,
        context_stack: https://www.tensorflow.org/federated/api_docs/python/tff/framework/ContextStack,
        annotated_type: Optional[https://www.tensorflow.org/federated/api_docs/python/tff/types/FunctionType] = None
    )

This implementation exposes methods to retrieve the backing `pb.Computation`,
as well as the Python representation of this protocol buffer represented by
an instance of `building_blocks.ComputationBuildingBlock`.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `computation_proto` | The protocol buffer that represents the computation, an instance of pb.Computation. |
| `context_stack` | The context stack to use. |
| `annotated_type` | Optional, type information with additional annotations that replaces the information in `computation_proto.type`. |

<br />

<br />

<br />

<br />

| ## Raises ||
|---|---|
| `TypeError` | If `annotated_type` is not `None` and is not compatible with `computation_proto.type`. |
| `ValueError` | If `computation_proto.type` is `None`. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `type_signature` | Returns the TFF type of this object. |

<br />

## Methods

### `from_building_block`

[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)

    @classmethod
    from_building_block(
        building_block: https://www.tensorflow.org/federated/api_docs/python/tff/framework/ComputationBuildingBlock
    ) -> 'ConcreteComputation'

Converts a computation building block to a computation impl.

### `get_proto`

[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)

    @classmethod
    get_proto(
        value: 'ConcreteComputation'
    ) -> pb.Computation

### `to_building_block`

[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)

    to_building_block()

### `to_compiled_building_block`

[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)

    to_compiled_building_block()

### `with_type`

[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)

    @classmethod
    with_type(
        value: 'ConcreteComputation',
        type_spec: https://www.tensorflow.org/federated/api_docs/python/tff/types/FunctionType
    ) -> 'ConcreteComputation'

### `__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
    )

Invokes the computation with the given arguments in the given context.

<br />

<br />

<br />

| Args ||
|---|---|
| `*args` | The positional arguments. |
| `**kwargs` | The keyword-based arguments. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| The result of invoking the computation, the exact form of which depends on the context. ||

<br />

### `__eq__`

[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)

    __eq__(
        other: object
    ) -> bool

Return self==value.