Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,请教您问题 #1

Open
zzidlezz opened this issue Aug 29, 2023 · 0 comments
Open

您好,请教您问题 #1

zzidlezz opened this issue Aug 29, 2023 · 0 comments

Comments

@zzidlezz
Copy link

联邦学习在哈希码的生成部分应该用超网生成哈希码,还是本地模型生成呢?根据您提供的代码,在验证中是选择了三个本地网络来生成哈希码。

valid

    if opt.valid:
        for idx in range(opt.num_users // 3):
            img_parameters = OrderedDict(
                {
                    k: p
                    for k, p in zip(
                    img_all_params_name,
                    img_client_model_params_list[idx]
                    )
                }
            )
            txt_parameters = OrderedDict(
                {
                    k: p
                    for k, p in zip(
                    txt_all_params_name,
                    txt_client_model_params_list[idx]
                    )
                }
            )
            img_model.load_state_dict(img_parameters)
            txt_model.load_state_dict(txt_parameters)
            mapi2t, mapt2i = valid(img_model, txt_model, query_x, retrieval_x, query_y, retrieval_y,
                                   query_L, retrieval_L)
            print('...round: %3d, valid MAP: MAP(i->t): %3.4f, MAP(t->i): %3.4f' % (round + 1, mapi2t, mapt2i))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant