PaddlePaddle / PaddleMIX

Paddle Multimodal Integration and eXploration, supporting mainstream multi-modal tasks, including end-to-end large-scale multi-modal pretrain models and diffusion model toolbox. Equipped with high performance and flexibility.
Apache License 2.0
357 stars 140 forks source link

自制数据训练clip模型报错 #804

Closed ericosmic closed 1 week ago

ericosmic commented 2 weeks ago

使用自制的数据,按照文档中要求的数据结构如下:

image

在训练中 使用task_name 作为训练数据文件的路径带入,命令如下: image 报错如下: image

有大佬能帮忙解决一下吗

luyao-cv commented 1 week ago

麻烦同学把最后一个反斜杠给去掉哈 d275ee5ec471068584ec7f17840b9edb

lyuwenyu commented 1 week ago

格式问题 这里也改了试一下;( -> --task_name ${task_name} \

image

可以多注意看报错信息以帮助定位问题

ValueError: Some specified arguments are not used by the PdArgumentParser: [
luyao-cv commented 1 week ago

参考修改:python -m paddle.distributed.launch --nproc_per_node 1 paddlemix/examples/clip/run_pretrain_dist.py \ --task_name "${task_name}" \ --dataloader_num_workers 2 \ --per_device_train_batch_size 16 \ --per_device_eval_batch_size 8 \ --model ${MODEL_NAME} \ --warmup_steps 2000 \ --learning_rate 5e-4 \ --weight_decay 0.05 \ --adam_beta1 0.9 \ --adam_beta2 0.999 \ --adam_epsilon 1e-8 \ --max_grad_norm 5.0 \ --num_train_epochs 200 \ --tensor_parallel_degree 1 \ --sharding_parallel_degree 8 \ --sharding "stage2" \ --bf16 False \ --output_dir "./output" \ --logging_steps 1 \ --do_train \ --disable_tqdm True \ --save_steps 50000 \ --local_loss true \ --gather_with_grad true \ --pretrained_text_model "CLIP-ViT-L-14-laion2B-s32B-b82K" \ --eval_classification_file '/home/aistudio/weapon-dataset-cls2/clip-anno.json'

ericosmic commented 1 week ago

参考修改:python -m paddle.distributed.launch --nproc_per_node 1 paddlemix/examples/clip/run_pretrain_dist.py --task_name "${task_name}" --dataloader_num_workers 2 --per_device_train_batch_size 16 --per_device_eval_batch_size 8 --model ${MODEL_NAME} --warmup_steps 2000 --learning_rate 5e-4 --weight_decay 0.05 --adam_beta1 0.9 --adam_beta2 0.999 --adam_epsilon 1e-8 --max_grad_norm 5.0 --num_train_epochs 200 --tensor_parallel_degree 1 --sharding_parallel_degree 8 --sharding "stage2" --bf16 False --output_dir "./output" --logging_steps 1 --do_train --disable_tqdm True --save_steps 50000 --local_loss true --gather_with_grad true --pretrained_text_model "CLIP-ViT-L-14-laion2B-s32B-b82K" --eval_classification_file '/home/aistudio/weapon-dataset-cls2/clip-anno.json'

谢谢 大佬😂