View source on GitHub |
A coder between maybe-serialized TF Examples and tf.Transform datasets.
tft.coders.ExampleProtoCoder(
schema, serialized=True
)
Args | |
---|---|
schema
|
A Schema proto.
|
serialized
|
Whether to encode serialized Example protos (as opposed to in-memory Example protos). |
Raises | |
---|---|
ValueError
|
If schema is invalid.
|
Methods
encode
encode(
instance
)
Encode a tf.transform encoded dict as tf.Example.