Giter Site home page Giter Site logo

RuntimeError: The expanded size of the tensor (21) must match the existing size (54) at non-singleton dimension 0. Target sizes: [21, 1024]. Tensor sizes: [54, 1024] about mmfewshot HOT 6 CLOSED

open-mmlab avatar open-mmlab commented on May 29, 2024
RuntimeError: The expanded size of the tensor (21) must match the existing size (54) at non-singleton dimension 0. Target sizes: [21, 1024]. Tensor sizes: [54, 1024]

from mmfewshot.

Comments (6)

linyq17 avatar linyq17 commented on May 29, 2024

For coco dataset, --coco needs to be attached.

from mmfewshot.

Williamlizl avatar Williamlizl commented on May 29, 2024

For coco dataset, --coco needs to be attached.

I need to change this?
./mmfewshot-main/tools/detection/misc/initialize_bbox_head.py
COCO_NOVEL_CLASSES = [ 1, 2, 3, 4, 5, 6, 7, 9, 16, 17, 18, 19, 20, 21, 44, 62, 63, 64, 67, 72 ] COCO_BASE_CLASSES = [ 8, 10, 11, 13, 14, 15, 22, 23, 24, 25, 27, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 65, 70, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90

from mmfewshot.

linyq17 avatar linyq17 commented on May 29, 2024

If using custom datasets, the pre-defined class ids need to be modified for your setting. If using default setting, you can run this command: python3 -m tools.detection.misc.initialize_bbox_head --src1 path/to/model --method random_init --save-dir path/to/dir --coco

from mmfewshot.

linyq17 avatar linyq17 commented on May 29, 2024

TAR_SIZE is the number of classes in the output model.

from mmfewshot.

Williamlizl avatar Williamlizl commented on May 29, 2024

TAR_SIZE is the number of classes in the output model.

OSError: /work_dirs/fsce_r101_fpn_coco-split1_base-training/base_model_random_init_bbox_head.pth is not a checkpoint file Traceback (most recent call last):

fsce coco in the step 3:
CUDA_VISIBLE_DEVICES=2,3 ./tools/detection/dist_train.sh ./configs/detection/fsce/coco/fsce_r101_fpn_coco_10shot-fine-tuning.py 2

from mmfewshot.

BIGWangYuDong avatar BIGWangYuDong commented on May 29, 2024

If you still meet this error, you can create a new issue

from mmfewshot.

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.