Adamdad/KnowledgeFactor

KD experiment problem and teacher checkpoint directory

AmirEstiri opened this issue · 1 comments

Hi,
Great work! When I run the tools/train.py file with the config file I get this following error.
Also, where should I put the checkpoints after downloading them?
Thanks

Traceback (most recent call last):
File "tools/train.py", line 15, in
from mmcls.apis import set_random_seed, train_model
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/apis/init.py", line 2, in
from .inference import inference_model, init_model, show_result_pyplot
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/apis/inference.py", line 10, in
from mmcls.datasets.pipelines import Compose
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/datasets/init.py", line 2, in
from .base_dataset import BaseDataset
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/datasets/base_dataset.py", line 13, in
from mmcls.models.losses import accuracy
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/models/init.py", line 2, in
from .backbones import * # noqa: F401,F403
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/models/backbones/init.py", line 3, in
from .conformer import Conformer
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcls/models/backbones/conformer.py", line 9, in
from mmcv.cnn.bricks.transformer import AdaptivePadding
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcv/cnn/bricks/transformer.py", line 22, in
from mmcv.ops.multi_scale_deform_attn import MultiScaleDeformableAttention # noqa F401
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcv/ops/init.py", line 10, in
from .corner_pool import CornerPool
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcv/ops/corner_pool.py", line 8, in
ext_module = ext_loader.load_ext('_ext', [
File "/home/amir-e/.conda/envs/kf/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 15, in load_ext
assert hasattr(ext, fun), f'{fun} miss in module {name}'
AssertionError: top_pool_forward miss in module _ext

Dear @AmirEstiri
You error seems to be a mmcv error, rather than an error of this repo. Please visit the mmcv documents (https://mmcv.readthedocs.io/en/latest/) for how to install it.

Besides, when you download the teacher checkpoint, you can put it anywhere and specify the path in model.train_cfg.teacher_checkpoint in your config.

Best