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 to Add Custom Parameters to loss, predict, and _forward Functions in New Segmentor in mmseg1.2.2 #3797

Open
jinqin-99 opened this issue Oct 17, 2024 · 0 comments

Comments

@jinqin-99
Copy link

Hello, I am using mmsegmentation to develop a new segmentation model. During the process, I found that I need to pass additional parameters through the loss, predict, and _forward functions. These parameters are essential for my custom logic, but the current implementation does not support such inputs.

add new parameters like this:

class NewSegmentor(EncoderDecoder):
    def loss(self, inputs, data_samples, new_param=None):
        pass

    def predict(self, inputs,data_samples, new_param=None):
        pass

    def _forward(self, inputs, data_samples, new_param=None):
        pass

What I should do? I look forward to your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant