简体   繁体   English

TFX - 什么是 example_gen_pb2 以及它记录在何处?

[英]TFX - What is example_gen_pb2 and where is it documented?

The ExampleGen TFX Pipeline Component has the example code which uses example_gen_pb2 but what is it and where is it documented? ExampleGen TFX 管道组件具有使用example_gen_pb2的示例代码,但它是什么以及记录在哪里?

# Input has a single split 'input_dir/*'.
# Output 2 splits: train:eval=3:1.
output = proto.Output(
             split_config=example_gen_pb2.SplitConfig(splits=[
                 proto.SplitConfig.Split(name='train', hash_buckets=3),
                 proto.SplitConfig.Split(name='eval', hash_buckets=1)
             ]))
example_gen = CsvExampleGen(input_base=input_dir, output_config=output)

The API doc is here . API 文档在这里 Since it's proto file, the easiest way is checking the definition itself, which has comments for the data structure.由于它是原型文件,最简单的方法是检查定义本身,其中包含对数据结构的注释。
Thank you!谢谢!

If you want to import it, you can do it from tfx.proto:如果你想导入它,你可以从 tfx.proto 中导入:

from tfx.proto import example_gen_pb2

Source: https://github.com/tensorflow/tfx/blob/master/tfx/components/example_gen/utils_test.py来源: https://github.com/tensorflow/tfx/blob/master/tfx/components/example_gen/utils_test.py

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM