class documentation
class TFRecordsWriter(object): (source)
Constructor: TFRecordsWriter(tf_records_path, num_shards)
Class for writing TFRecords to disk.
Example Usage:
with TFRecordsWriter("/path/for/tf.records", num_shards=5) as writer: for tf_example in tf_examples: writer.write(tf_example)
Parameters | |
tf | the path to write the .tfrecords file. If sharding is requested -%%05d-of-%%05d is appended to the path |
num | an optional number of shards to split the records into (using a round robin strategy). If omitted, no sharding is used |
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | write |
Writres the tf.train.Example proto to disk. |
Instance Variable | num |
Undocumented |
Instance Variable | tf |
Undocumented |
Instance Variable | _idx |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _writers |
Undocumented |
Instance Variable | _writers |
Undocumented |