Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i build a network with multi-head branch? #751

Closed
flywheel1412 opened this issue Mar 30, 2022 · 2 comments
Closed

how can i build a network with multi-head branch? #751

flywheel1412 opened this issue Mar 30, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@flywheel1412
Copy link

Description

I want to build a classification network with 2 or 3 head, and I don't know how to write the config file.

Example

training a ResNet18 with two head, head1 predict object is cat or dog; and head2 predict object's color is white, black, orange or other.

the original ResNet18 network define as fellow in config, and how to modifiy it?

model = dict(
    type='ImageClassifier',
    backbone=dict(
        type='ResNet',
        depth=18,
        num_stages=4,
        out_indices=(3, ),
        style='pytorch'),
    neck=dict(type='GlobalAveragePooling'),
    head=dict(
        type='LinearClsHead',
        num_classes=1000,
        in_channels=512,
        loss=dict(type='CrossEntropyLoss', loss_weight=1.0),
        topk=(1, 5),
    ))
@flywheel1412 flywheel1412 added the help wanted Extra attention is needed label Mar 30, 2022
@Ezra-Yu
Copy link
Collaborator

Ezra-Yu commented Mar 30, 2022

This feature is currently under development, here is the PR #675

@flywheel1412
Copy link
Author

ok, tkx for your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants