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

Request for visualization code #16

Open
sausage0611 opened this issue Jul 23, 2024 · 3 comments
Open

Request for visualization code #16

sausage0611 opened this issue Jul 23, 2024 · 3 comments

Comments

@sausage0611
Copy link

Dear author, hello! I'm sorry to disturb you, but I would also like to have a copy of the same visualization code. If it's convenient for you, could you please send it to me? my email is meiyinhu@email.ncu.edu.cn. I'm sorry to bother you.

@daviswer
Copy link
Collaborator

Hello! Thanks for reaching out. Unfortunately the status of the old visualization code is somewhat in limbo at this point... after offline discussion from #14 we determined that the trained model used for the reconstruction doesn't match the weights for the publicly released model (our working code model was trained with a different seed). So the visualization code plus training code for the reconstructor can be found here (training was relatively quick on a single GPU from what I recall), but may also require some updating as it was built to hook into our working code rather than the public code in this repo. I'll leave the following possible recommendations:

- z = model.get_feature_vector(inp.cuda())*np.sqrt(640) 
  Be changed to -> z = model.feature_extractor(inp.cuda()) 
                -> z = z.view(z.shape[0], 25, -1)*np.sqrt(640)
  The reason is that 'FRN' object has no attribute 'get_feature_vector'

- eval_loader = dataloader.meta_test_dataloader(val_path, way=5, shot=5, pre=True)
  Be changed to -> eval_loader = dataloader.meta_test_dataloader(val_path, way=5, shot=5, pre=False, transform_type=0)

- Try removing the np.sqrt(640) scaling factor on the feature vector above. 
  Given that the regenerator code is clearly set up for an older version of the model code, 
  there might be a scaling mismatch. 
  You might also try multiplying by 640 instead of sqrt(640), for the same reason.

@daviswer
Copy link
Collaborator

(Requesting that we leave this issue open so that future requests can be directed here)

@sausage0611
Copy link
Author

(Requesting that we leave this issue open so that future requests can be directed here)

Okay, thank you very much for your help!

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

2 participants