コード例 #1
0
def multi_layer_encoder(module_mocker):
    return patch_multi_layer_encoder_loader(
        targets=make_paper_mock_target("_loss", "_multi_layer_encoder"),
        loader=paper.multi_layer_encoder,
        setups=((), {}),
        mocker=module_mocker,
    )
コード例 #2
0
def multi_layer_encoder(package_mocker):
    return mocks.patch_multi_layer_encoder_loader(
        targets=mocks.make_mock_target("ulyanov_et_al_2016", "_loss",
                                       "_multi_layer_encoder"),
        loader=paper.multi_layer_encoder,
        setups=((), {}),
        mocker=package_mocker,
    )
コード例 #3
0
def multi_layer_encoder(module_mocker):
    return patch_multi_layer_encoder_loader(
        targets=[
            make_paper_mock_target("_loss", "_multi_layer_encoder"),
            make_paper_mock_target("_utils", "multi_layer_encoder_"),
        ],
        loader=paper.multi_layer_encoder,
        setups=((), {"impl_params": True}),
        mocker=module_mocker,
    )
コード例 #4
0
def multi_layer_encoder(package_mocker):
    return mocks.patch_multi_layer_encoder_loader(
        targets=mocks.make_mock_target("johnson_alahi_li_2016", "_loss",
                                       "_multi_layer_encoder"),
        loader=paper.multi_layer_encoder,
        setups=((), {
            "impl_params": True
        }),
        mocker=package_mocker,
    )
コード例 #5
0
def multi_layer_encoder(package_mocker):
    return mocks.patch_multi_layer_encoder_loader(
        targets=[
            mocks.make_mock_target("gatys_et_al_2017", *path) for path in (
                ("multi_layer_encoder", ),
                ("_loss", "_multi_layer_encoder"),
                ("_utils", "multi_layer_encoder_"),
            )
        ],
        loader=paper.multi_layer_encoder,
        setups=((), {}),
        mocker=package_mocker,
    )
コード例 #6
0
def multi_layer_encoder(package_mocker):
    setups = [((), {})]
    setups.extend([((), dict(impl_params=impl_params))
                   for impl_params in (True, False)])
    return mocks.patch_multi_layer_encoder_loader(
        targets=[
            mocks.make_mock_target("gatys_ecker_bethge_2016", *path)
            for path in (
                ("_loss", "_multi_layer_encoder"),
                ("_utils", "multi_layer_encoder_"),
            )
        ],
        loader=paper.multi_layer_encoder,
        setups=setups,
        mocker=package_mocker,
    )