transformers/examples/contrib/mm-imdb
Sam Shleifer 45e26125de
save_pretrained: mkdir(exist_ok=True) (#5258)
* all save_pretrained methods mkdir if not os.path.exists
2020-06-28 14:53:47 -04:00
..
README.md BIG Reorganize examples (#4213) 2020-05-07 13:48:44 -04:00
run_mmimdb.py save_pretrained: mkdir(exist_ok=True) (#5258) 2020-06-28 14:53:47 -04:00
utils_mmimdb.py BIG Reorganize examples (#4213) 2020-05-07 13:48:44 -04:00

MM-IMDb

Based on the script run_mmimdb.py.

MM-IMDb is a Multimodal dataset with around 26,000 movies including images, plots and other metadata.

Training on MM-IMDb

python run_mmimdb.py \
    --data_dir /path/to/mmimdb/dataset/ \
    --model_type bert \
    --model_name_or_path bert-base-uncased \
    --output_dir /path/to/save/dir/ \
    --do_train \
    --do_eval \
    --max_seq_len 512 \
    --gradient_accumulation_steps 20 \
    --num_image_embeds 3 \
    --num_train_epochs 100 \
    --patience 5