tff.Value
Stay organized with collections
Save and categorize content based on your preferences.
A generic base class for values that appear in TFF computations.
Inherits From: TypedObject
tff.Value(
comp: 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
).
Args |
comp
|
An instance of building_blocks.ComputationBuildingBlock that
contains the logic that computes this value.
|
Attributes |
comp
|
|
type_signature
|
Returns the TFF type of this object (an instance of tff.Type ).
|
Methods
__bool__
View source
__bool__()
__call__
View source
__call__(
*args, **kwargs
)
Call self as a function.
__getitem__
View source
__getitem__(
key: Union[int, str, slice]
)
__iter__
View source
__iter__()
__len__
View source
__len__()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-20 UTC.
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.Value\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [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) |\n\nA generic base class for values that appear in TFF computations.\n\nInherits From: [`TypedObject`](../tff/TypedObject) \n\n tff.Value(\n comp: ../tff/framework/ComputationBuildingBlock\n )\n\nIf the value in this class is of `StructType` or `FederatedType` containing a\n`StructType`, the inner fields can be accessed by name\n(e.g. `y = my_value_impl.y`).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|-----------------------------------------------------------------------------------------------------------|\n| `comp` | An instance of building_blocks.ComputationBuildingBlock that contains the logic that computes this value. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|------------------|---------------------------------------------------------------------------------------|\n| `comp` | \u003cbr /\u003e \u003cbr /\u003e |\n| `type_signature` | Returns the TFF type of this object (an instance of [`tff.Type`](../tff/types/Type)). |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `__bool__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __bool__()\n\n### `__call__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __call__(\n *args, **kwargs\n )\n\nCall self as a function.\n\n### `__getitem__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __getitem__(\n key: Union[int, str, slice]\n )\n\n### `__iter__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __iter__()\n\n### `__len__`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n __len__()"]]