keitakurita / contextual_embedding_bias_measure Goto Github PK
View Code? Open in Web Editor NEWCode for the paper "Measuring Bias in Contextualized Word Representations"
Code for the paper "Measuring Bias in Contextualized Word Representations"
Hello,
I went through the notebooks for NIPS method replication, however, I couldn't find some files.
Are the files:
gender_occ_pos_w_probs_train.txt
gender_occ_neg_w_probs_train.txt
gender_emo_w_probs_train.txt
gender_occ_pos_w_probs_val.txt
gender_occ_neg_w_probs_val.txt
gender_emo_w_probs_val.txt
In
weat_result_replication_permute_targets.ipynb
There seems to be problem with get_index() called in function in get_mask_fill_logits.
print(np.log(get_mask_fill_logits("[MASK] are beautiful.", ["clover"])['clover']))
print(np.log(get_mask_fill_logits("[MASK] are [MASK].", ["clover"], use_last_mask=True)['clover']))
results in
gender_comes_first=False
Tokens for ptgt : [[MASK], are, beautiful, .]
0 [MASK]
return maskid from get_index() function : 1
response from get_mask_fill_logits : -18.595278
gender_comes_first=True
Tokens for prior : [[MASK], are, [, [UNK]]
0 [UNK]
1 [
2 are
3 [MASK]
maskid : 0
response from get_mask_fill_logits : -10.874125
gender_comes_first=True
Expected response:
Tokens for prior : [[MASK], are, [MASK], .]
0 [MASK]
1 are
2 [MASK]
3 .
maskid : 3
response from get_mask_fill_logits : -28.40166
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.