oxai / debias-vision-lang Goto Github PK
View Code? Open in Web Editor NEWA Prompt Array Keeps the Bias Away: Debiasing Vision-Language Models with Adversarial Learning [AACL 2022]
Home Page: https://arxiv.org/abs/2203.11933
License: Other
A Prompt Array Keeps the Bias Away: Debiasing Vision-Language Models with Adversarial Learning [AACL 2022]
Home Page: https://arxiv.org/abs/2203.11933
License: Other
Getting the following error when trying to import the library:
ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 import debias_clip
/usr/local/lib/python3.10/dist-packages/debias_clip/init.py in
24
25 from .model import *
---> 26 from measuring_bias import measure_bias
ModuleNotFoundError: No module named 'measuring_bias'
You provide code for measuring NDKL and MaxSkew where the desired distribution for the similar images is based on either demographic parity or equality of opportunity. When reporting results in your paper, which of these did you use? Apologies if this is somewhere I missed!
Hi,
I want to reproduce the debiasing training using my own prompts. Do you plan to publish the training script, including the hyperparameters used?
Thank you.
Thanks a lot for making your code public. It's very useful.
I found a couple of mistakes, 1) I had to change "from measuring_bias" to "from .measuring_bias" otherwise I was getting an import error. 2) I had to move debias_tokens to gpu explicitly with self.debias_tokens = self.debias_tokens.to(text.device)
Now, I am getting the following error in encode_text function:
text_features = self.clip.transformer(text_features)
RuntimeError: mat1 and mat2 must have the same dtype
I have tried to change the dtype variable (model.py line 168 to float32, float64), I have also tried to explicitly set the text_features to self.dtype before calling clip.transformer (model.py line 257) but no dice. Could you perhaps help?
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.