openfl.protocols.utils.construct_named_tensor#
- openfl.protocols.utils.construct_named_tensor(tensor_key, nparray, transformer_metadata, lossless)[source]#
Construct named tensor.
- Parameters:
tensor_key – The key of the tensor.
nparray – The numpy array representing the tensor data.
transformer_metadata – The transformer metadata for the tensor.
lossless – A flag indicating whether the tensor is lossless.
- Returns:
The named tensor.
- Return type:
named_tensor