This is the code repository for the paper: "Divide-and-Conquer: Prompt-based Distribution Learning for Multimodal Sentiment Analysis"
The code has been refactored. Please raise any issues.
-
Prepare the dataset and pre-trained RoBERTa. For dataset , you can download the processed data from Self-MM. For RoBERTa model, you can download robert-large and chinese-roberta-wwm-ext from Hugging Face.
-
Clone this repo and install requirements.
git clone https://github.com/Dongri404/PDL.git cd PDL conda create --name pdl python=3.8 source activate pdl pip install -r requirements.txt
-
Update path. Modify the
config/config_tune.pyandconfig/config_regression.pyto update dataset paths . Update the pretrained model path inmodels/subNets/BertTextEncoder.py. -
Run
python -u run.py --datasetNames sims mosi mosei