[Fix] Fix lint and mmcv version requirement for IPU.
parent
b4eefe4794
commit
1d6fbe0efe
|
@ -10,6 +10,8 @@ paramwise_cfg = dict(custom_keys={
|
|||
'.pos_embed': dict(decay_mult=0.0)
|
||||
})
|
||||
|
||||
pretrained = 'https://download.openmmlab.com/mmclassification/v0/vit/pretrain/vit-base-p16_3rdparty_pt-64xb64_in1k-224_20210928-02284250.pth' # noqa
|
||||
|
||||
model = dict(
|
||||
head=dict(
|
||||
loss=dict(type='CrossEntropyLoss', loss_weight=1.0, _delete_=True), ),
|
||||
|
@ -17,7 +19,7 @@ model = dict(
|
|||
img_size=224,
|
||||
init_cfg=dict(
|
||||
type='Pretrained',
|
||||
checkpoint='https://download.openmmlab.com/mmclassification/v0/vit/pretrain/vit-base-p16_3rdparty_pt-64xb64_in1k-224_20210928-02284250.pth', # noqa
|
||||
checkpoint=pretrained,
|
||||
_delete_=True,
|
||||
prefix='backbone')))
|
||||
|
|
@ -8,10 +8,14 @@ import numpy as np
|
|||
import torch
|
||||
from mmcv.parallel import collate
|
||||
from mmcv.runner import get_dist_info
|
||||
from mmcv.utils import (IS_IPU_AVAILABLE, Registry, build_from_cfg,
|
||||
digit_version)
|
||||
from mmcv.utils import Registry, build_from_cfg, digit_version
|
||||
from torch.utils.data import DataLoader
|
||||
|
||||
try:
|
||||
from mmcv.utils import IS_IPU_AVAILABLE
|
||||
except ImportError:
|
||||
IS_IPU_AVAILABLE = False
|
||||
|
||||
if platform.system() != 'Windows':
|
||||
# https://github.com/pytorch/pytorch/issues/973
|
||||
import resource
|
||||
|
|
Loading…
Reference in New Issue