Skip to content

Commit

Permalink
fix models path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
flow3rdown committed Feb 7, 2023
1 parent a40a8ff commit c7802cc
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
logs/

__pycache__/

checkpoints

output/

training/
2 changes: 1 addition & 1 deletion MarT/scripts/run_finetune_flava.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python main.py \
--max_epochs=15 \
--num_workers=4 \
--model_name_or_path bert-base-uncased \
--visual_model_path flava-full \
--visual_model_path facebook/flava-full \
--accumulate_grad_batches 1 \
--model_class FlavaKGC \
--batch_size 24 \
Expand Down
2 changes: 1 addition & 1 deletion MarT/scripts/run_finetune_mkgformer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python main.py \
--max_epochs=15 \
--num_workers=4 \
--model_name_or_path bert-base-uncased \
--visual_model_path clip-vit-base-patch32 \
--visual_model_path openai/clip-vit-base-patch32 \
--accumulate_grad_batches 1 \
--model_class MKGformerKGC \
--batch_size 32 \
Expand Down
2 changes: 1 addition & 1 deletion MarT/scripts/run_finetune_vilt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python main.py \
--max_epochs=15 \
--num_workers=4 \
--model_name_or_path bert-base-uncased \
--visual_model_path vilt-b32-finetuned-vqa \
--visual_model_path dandelin/vilt-b32-finetuned-vqa \
--accumulate_grad_batches 1 \
--model_class ViltKGC \
--batch_size 32 \
Expand Down
2 changes: 1 addition & 1 deletion MarT/scripts/run_finetune_visualbert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python main.py \
--max_epochs=15 \
--num_workers=4 \
--model_name_or_path bert-base-uncased \
--visual_model_path visualbert-vqa-coco-pre \
--visual_model_path uclanlp/visualbert-vqa-coco-pre \
--accumulate_grad_batches 1 \
--model_class VisualBertKGC \
--batch_size 64 \
Expand Down
2 changes: 1 addition & 1 deletion MarT/scripts/run_pretrain_mkgformer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ python main.py \
--max_epochs=30 \
--num_workers=4 \
--model_name_or_path bert-base-uncased \
--visual_model_path clip-vit-base-patch32 \
--visual_model_path openai/clip-vit-base-patch32 \
--accumulate_grad_batches 1 \
--model_class MKGformerKGC \
--batch_size 64 \
Expand Down
2 changes: 1 addition & 1 deletion MarT/scripts/run_pretrain_vlp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ python main.py \
--max_epochs=15 \
--num_workers=4 \
--model_name_or_path bert-base-uncased \
--visual_model_path flava-full \
--visual_model_path facebook/flava-full \
--accumulate_grad_batches 1 \
--model_class FlavaKGC \
--batch_size 24 \
Expand Down
4 changes: 2 additions & 2 deletions MarT/tools/encode_images_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
print(len(img_path))

if processor_name == 'clip':
processor = CLIPProcessor.from_pretrained('clip-vit-base-patch32')
processor = CLIPProcessor.from_pretrained('openai/clip-vit-base-patch32')

entity2visual = {}
for entity in tqdm(img_path, total=len(img_path)):
Expand All @@ -30,7 +30,7 @@
elif processor_name == 'vilt':
entity2visual = []

processor = ViltProcessor.from_pretrained('vilt-b32-finetuned-vqa')
processor = ViltProcessor.from_pretrained('dandelin/vilt-b32-finetuned-vqa')

for entity in tqdm(img_path, total=len(img_path)):
path = os.path.join(base_path, entity)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
transformers==4.16.0
transformers==4.19.0
torchvision==0.8.0
scipy==1.6.2
scikit-learn==1.0.2
Expand Down

0 comments on commit c7802cc

Please sign in to comment.