HKUST-KnowComp / GEIA

Code for Findings-ACL 2023 paper: Sentence Embedding Leaks More Information than You Expect: Generative Embedding Inversion Attack to Recover the Whole Sentence
MIT License
40 stars 12 forks source link

KeyError: 'threshold' #4

Open N0Carrot opened 9 months ago

N0Carrot commented 9 months ago

Running as: python GEIA-main/baseline/projection.py --model_dir /gpt2-large --num_epochs 1 --batch_size 2 --dataset abcd --embed_model sent_t5 --model_type NN

File "GEIA-main/baseline/projection.py", line 425, in eval_label threshold = config['threshold'] KeyError: 'threshold'

teapotliid commented 9 months ago

Running as: python GEIA-main/baseline/projection.py --model_dir /gpt2-large --num_epochs 1 --batch_size 2 --dataset abcd --embed_model sent_t5 --model_type NN

File "GEIA-main/baseline/projection.py", line 425, in eval_label threshold = config['threshold'] KeyError: 'threshold'

Hi Carrot,

The 'threshold' refers to the decision boundary for NNs. You can set it manually: config['threshold'] = 0.3

Previously, we used a for loop for 'threshold' from 0 to 1 with a gap of 0.05 and deleted the code. Sorry for the mistake caused.