Update blip.py

This commit is contained in:
Junnan Li
2022-01-28 23:09:56 +08:00
committed by GitHub
parent 0480d94d57
commit b84fe149ae

View File

@@ -5,6 +5,8 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
* By Junnan Li
'''
import warnings
warnings.filterwarnings("ignore")
from models.vit import VisionTransformer, interpolate_pos_embed
from models.med import BertConfig, BertModel, BertLMHeadModel
@@ -233,4 +235,4 @@ def load_checkpoint(model,url_or_filename):
msg = model.load_state_dict(state_dict,strict=False)
print('load checkpoint from %s'%url_or_filename)
return model,msg