mirror of
https://github.com/salesforce/BLIP.git
synced 2026-04-30 20:31:12 +00:00
Update blip.py
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
||||||
* By Junnan Li
|
* By Junnan Li
|
||||||
'''
|
'''
|
||||||
|
import warnings
|
||||||
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
from models.vit import VisionTransformer, interpolate_pos_embed
|
from models.vit import VisionTransformer, interpolate_pos_embed
|
||||||
from models.med import BertConfig, BertModel, BertLMHeadModel
|
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)
|
msg = model.load_state_dict(state_dict,strict=False)
|
||||||
print('load checkpoint from %s'%url_or_filename)
|
print('load checkpoint from %s'%url_or_filename)
|
||||||
return model,msg
|
return model,msg
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user