- Notifications
You must be signed in to change notification settings - Fork18
Personalised FedReID#10
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| # inputs = Variable(inputs.cuda().detach()) | ||
| # labels = Variable(labels.cuda().detach()) | ||
| #else: | ||
| # inputs, labels = Variable(inputs), Variable(labels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can just remove these comments
| self.model.train(True) | ||
| optimizer=get_optimizer(self.model,self.lr) | ||
| scheduler=lr_scheduler.StepLR(optimizer,step_size=40,gamma=0.1) | ||
| #scheduler = lr_scheduler.StepLR(optimizer, step_size=40, gamma=0.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Why we don't need the scheduler anymore?
| #parser = argparse.ArgumentParser(description='Training') | ||
| #parser.add_argument('--result_dir', default='.', type=str) | ||
| #parser.add_argument('--dataset', default='no_dataset', type=str) | ||
| #args = parser.parse_args() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Remove these comments
| gallery_label=np.array(result['gallery_label']) | ||
| # print(type(query_feature),query_feature[:3]) | ||
| # print(type(query_cam),query_cam[:3]) | ||
| # print(type(query_label),query_label[:3]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Remove these debugging prints
| # result = scipy.io.loadmat(file_path) | ||
| # print("========= after loading ==========") | ||
| # for i in result: | ||
| # print(i, np.array(result[i]).shape) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Remove these comments
| ifargs.regularization: | ||
| reg="reg" | ||
| else: | ||
| reg="Nreg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Are theseif else from line 95 - 110 only for setting the name for the checkpoint? It would be better to put them into a function.
| parser.add_argument('--multiple_scale',default='1',type=str,help='multiple_scale: e.g. 1 1,1.1 1,1.1,1.2') | ||
| parser.add_argument('--test_dir',default='all',type=str,help='./test_data') | ||
| parser.add_argument('--resume_epoch',default=0,type=int,help='resume from which epoch, if 0, no resume') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Shouldn't it be resume round?
| @@ -0,0 +1,4 @@ | |||
| export PYTHONPATH=$PYTHONPATH:$pwd | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Put all these scripts for running into a separate folderscript
| importrandom | ||
| importtorch.optimasoptim | ||
| fromtorchvisionimportdatasets | ||
| # from finch import FINCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
remove comment
| print("==============================") | ||
| print("number of clients used:",len(models)) | ||
| #print("number of clients used:", len(models)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Remove comment
support personalised clustering training for FedReID