【问题标题】:TFX - What is example_gen_pb2 and where is it documented?TFX - 什么是 example_gen_pb2,它记录在哪里?
【发布时间】:2022-10-01 16:19:44
【问题描述】:

The ExampleGen TFX Pipeline Component 有使用的示例代码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)

    标签: tfx


    【解决方案1】:

    我有同样的问题。我在任何地方都找不到它。我认为这是他们文档中的错误。 SplitConfig 现在属于 proto,所以我只是用 proto 切换了 example_gen_pb2。 (https://www.tensorflow.org/tfx/api_docs/python/tfx/v1/proto/SplitConfig) 我希望我能帮上忙。

    【讨论】:

      【解决方案2】:

      如果要导入它,可以从 tfx.proto 进行:

      from tfx.proto import example_gen_pb2
      

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

      【讨论】:

        猜你喜欢
        • 2019-12-23
        • 1970-01-01
        • 2011-11-25
        • 2011-03-26
        • 1970-01-01
        • 2019-06-26
        相关资源
        最近更新 更多