StatisticsGen无法识别缺少的字段

时间:2020-11-10 20:42:14

标签: tensorflow tensorflow2.0 tfx

由于某些原因,StatisticsGen无法识别文件中缺少的值。 我期望StatisticsGen能够识别最后一条记录中缺少的字段。 当我使用generate_statistics_from_csv

生成统计信息时
# Loading the Files
input_config = example_gen_pb2.Input(splits=[
    example_gen_pb2.Input.Split(name='train', pattern='train/*'),
    example_gen_pb2.Input.Split(name='eval', pattern='eval/*')
])

example_gen = CsvExampleGen(
    input_base=_data_root,
    input_config=input_config)

context.run(example_gen, enable_cache=False)

# Generating Stats
statistics_gen = StatisticsGen(examples=example_gen.outputs['examples'])
context.run(statistics_gen, enable_cache=False)

# Showing the Stats
context.show(statistics_gen.outputs['statistics'])

用于测试的文件:

index,inputSurname,label
0,BALLADARAS NATE RAE,0
1,LABRANCHE TRACIE SURIANO,0
2,VENTURES LLC             TIERNAN RE,1
3,CHOU                     ABC,1
4,JENSEN DARREN RANEE,0
5,VANDERMOLEN DEBORA PATRICIA,0
6,ZAMBRANO YANGFANG SESE,0
7,IMAGE LLC                DENTAL,1
8,OFFICE                   S BRUCE             LAW,1
9,,

0 个答案:

没有答案
相关问题