def stackoverflow_07()

in Synthesis_incorporation/benchmarks/stackoverflow_benchmarks.py [0:0]


def stackoverflow_07():
    examples = [
        benchmark.Example(
            inputs=[
                [
                    [[8, 4, 6], [2, 12, 3]],
                    [[11, 12, 5], [9, 12, 12]],
                    [[9, 2, 13], [7, 0, 7]],
                    [[2, 10, 5], [7, 1, 2]],
                ],
            ],
            output=[
                [[8, 4, 6], [11, 12, 5], [9, 2, 13], [2, 10, 5]],
                [[2, 12, 3], [9, 12, 12], [7, 0, 7], [7, 1, 2]],
            ],
        ),
    ]
    constants = []
    description = "swap the first two dimensions of the tensor"
    target_program = "torch.transpose(in1, 0, 1)"
    source = (
        "https://stackoverflow.com/questions/38212205/swap-tensor-axes-in-tensorflow"
    )
    return benchmark.Benchmark(
        examples=examples,
        constants=constants,
        description=description,
        target_program=target_program,
        source=source,
        name="stackoverflow_07",
    )