Giter Club home page Giter Club logo

Comments (7)

Jingkang50 avatar Jingkang50 commented on July 30, 2024

That seems weird to me. use_sigmoid should not affect the out channels. Did you change other stuff?

from openpsg.

ShunchiZhang avatar ShunchiZhang commented on July 30, 2024

Sorry for the late reply.

  1. I am quite sure I changed nothing from the original code;
  2. This snippets suggests that use_sigmoid will affect the value of *_out_channels.
    if self.obj_loss_cls.use_sigmoid:
    self.obj_cls_out_channels = num_classes
    else:
    self.obj_cls_out_channels = num_classes + 1
    if self.sub_loss_cls.use_sigmoid:
    self.sub_cls_out_channels = num_classes
    else:
    self.sub_cls_out_channels = num_classes + 1
    if rel_loss_cls['use_sigmoid']:
    self.rel_cls_out_channels = num_relations
    else:
    self.rel_cls_out_channels = num_relations + 1

from openpsg.

ShunchiZhang avatar ShunchiZhang commented on July 30, 2024

I guess a potential bug is that class labels in gt_rel starts from 1 rather than 0, therefore the reduction of cls_out_channels could lead to IndexErrors (as it doesn't happen on subject and object, but only relation). However I am not sure about the associated codes with this special setting, much appreciated if you could point them out.

from openpsg.

Jingkang50 avatar Jingkang50 commented on July 30, 2024

I am not quite sure too. The code is written by mmdet.
To avoid this, what I would suggest is to write a loss function by your own.

from openpsg.

ShunchiZhang avatar ShunchiZhang commented on July 30, 2024

Thanks. I'll try to figure it out by myself.

from openpsg.

Jingkang50 avatar Jingkang50 commented on July 30, 2024

@GSeanCDAT You could also comment here.

from openpsg.

GSeanCDAT avatar GSeanCDAT commented on July 30, 2024

@ShunchiZhang Hi there,
I think the possible solution might be to turn the gt_rels into one-hot before calculating the loss. (make sure you set the first element of one-hot as the background class).

from openpsg.

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.