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

can not run well #3

Open
Kiyi-Lee opened this issue Nov 26, 2023 · 1 comment
Open

can not run well #3

Kiyi-Lee opened this issue Nov 26, 2023 · 1 comment

Comments

@Kiyi-Lee
Copy link

Dear authors, thank you for sharing the source code,it's a great job. I have some questions regarding running the code followed the readme guide.

Firstly, is Central.py the baseline? Is it related to the central server model? I had to change the position of model.train() to make it run properly.

Secondly, in the set_train_test_file() of meta-har.py, I changed [self.user_id = self.training_op["train_file"][0].split(os.sep)[-1].split("_")[0] + "act"] to [self.user_id = self.training_op["train_file"][0].split(os.sep)[-1].split("")[0]] because the format in feature_extraction.py for processing the collected dataset does not include '_act'. After making this change, I was able to run meta-har.py successfully. However, I found that with the default parameters, the results were very poor, with accuracies in meta-train and meta-har even below 10%. Additionally, during the running process, I received a warning:
UserWarning:
Detected call of lr_scheduler.step() before optimizer.step().
In PyTorch 1.1.0 and later, you should call them in the opposite
order: optimizer.step() before lr_scheduler.step(). Failure to do this will result
in PyTorch skipping the first value of the learning rate schedule.
See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
warnings.warn("Detected call of lr_scheduler.step() before `optimizer.step()".
I have not yet resolved this issue. I am unsure if this warning is causing the poor results or if there is something else I have overlooked.

Thirdly, I have not fully understood the initialization of the server model. Does the server model undergo a training process, or does the local client only pull parameters from the server model for training and updating the server model's initialization? This is because I only see the operation server_model = reptile_meta(har_model.norm_embed, lr, device, utils.pairwiseloss(), 100, 7). Is this the preliminary initialization?

I would greatly appreciate your response.

@Kiyi-Lee
Copy link
Author

Kiyi-Lee commented Nov 26, 2023

image

image

The above figures are the meta-test test results and meta-train test result during the running process respectively

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