View source on GitHub |
Serializes 'type_spec' as a pb.Type.
tff.types.serialize_type(
type_spec: tff.types.Type
) -> pb.Type
Args | |
---|---|
type_spec
|
A computation_types.Type .
|
Returns | |
---|---|
The corresponding instance of pb.Type .
|
Raises | |
---|---|
TypeError
|
if the argument is of the wrong type. |
NotImplementedError
|
for type variants for which serialization is not implemented. |