Giter VIP home page Giter VIP logo

Comments (1)

duanduanduanyuchen avatar duanduanduanyuchen commented on June 10, 2024

Traceback (most recent call last): File "train.py", line 207, in main() File "train.py", line 203, in main meta=meta) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmdet/apis/train.py", line 208, in train_detector runner.run(data_loaders, cfg.workflow) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 127, in run epoch_runner(data_loaders[i], **kwargs) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmcv/runner/epoch_based_runner.py", line 45, in train self.call_hook('before_train_epoch') File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmcv/runner/base_runner.py", line 309, in call_hook getattr(hook, fn_name)(self) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmdet/datasets/utils.py", line 158, in before_train_epoch self._check_head(runner) File "/opt/conda/envs/vit_37/lib/python3.7/site-packages/mmdet/datasets/utils.py", line 145, in _check_head (f'The num_classes ({module.num_classes}) in ' AssertionError: The num_classes (80) in BEiTAdapter of MMDataParallel does not matches the length of CLASSES 5) in CocoDataset

this is my log.

I have 5 class in my custom data, but it seems to need to have 80 classes to use pretrained weight. Can you give solution?

Hi! Can you share your config file?
Maybe you can edit the num_classes here: https://github.com/czczup/ViT-Adapter/detection/mmdet_custom/models/backbones/beit_adapter.py#L27

from vit-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.