in Synthesis_incorporation/benchmarks/stackoverflow_benchmarks.py [0:0]
def stackoverflow_14():
examples = [
benchmark.Example(
inputs=[
[
[
[0, 0, 1],
[0, 0, 0],
[1, 0, 1],
[0, 1, 0],
[0, 0, 0],
[1, 1, 1],
[1, 1, 0],
# [False, False, True],
# [False, False, False],
# [True, False, True],
# [False, True, False],
# [False, False, False],
# [True, True, True],
# [True, True, False],
]
],
],
output=[[1, 0, 1, 1, 0, 1, 1]]
# [[True, False, True, True, False, True, True]],
),
]
constants = []
target_program = "torch.sum(in1, -1).bool()"
description = "choose True if any value in a row is True, False otherwise"
source = "https://stackoverflow.com/questions/35657003/aggregate-each-element-of-tensor-in-tensorflow"
return benchmark.Benchmark(
examples=examples,
constants=constants,
description=description,
target_program=target_program,
source=source,
name="stackoverflow_14",
)