Skip to content

Debiasing

Prajjwal Bhargava edited this page Aug 21, 2020 · 2 revisions

HEX Orthogonal Projection method

from fluence.models import OrthogonalTransformer

cbow = CBOW() # Any superficial model, for reference, check the tests directory
tfmr = AutoModel.from_pretrained('bert-base-uncased')
config = AutoConfig.from_pretrained('bert-base-uncased')
config.batch_size = 2
config.lamb = 0.001
model = OrthogonalTransformer(tfmr, cbow, config)

Pass this into HF Trainer.

Clone this wiki locally