OFA-Sys / Chinese-CLIP

Chinese version of CLIP which achieves Chinese cross-modal retrieval and representation generation.
MIT License
4.21k stars 439 forks source link

源码中的一些bug,请确认下~ #253

Closed ChesonHuang closed 5 months ago

ChesonHuang commented 6 months ago

1. 模块:cn_clip.training.train.py 第185行

m = model.module 当model没有module模块时,这里会出错,这里需要判断下?

2.模块:cn_clip.training.train.py 第21行,第194行

第194行 total_loss, acc = get_loss(model, images, texts, loss_img, loss_txt, args) 这里的model是CLIP实例 但在第21,23行get_loss函数中: image_features, text_features, logit_scale = model(images, texts, args.mask_ratio) 这个model应该是个向前传播函数,而不是一个model 请确认下以上问题