FRN icon indicating copy to clipboard operation
FRN copied to clipboard

Request for visualization code

Open sausage0611 opened this issue 1 year ago • 3 comments

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 [email protected]. I'm sorry to bother you.

sausage0611 avatar Jul 23 '24 14:07 sausage0611

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 avatar Jul 23 '24 14:07 daviswer

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

daviswer avatar Jul 23 '24 14:07 daviswer

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

Okay, thank you very much for your help!

sausage0611 avatar Jul 24 '24 06:07 sausage0611