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

PNetlin.forward image normalization #9

Closed
roimehrez opened this issue Jun 13, 2018 · 1 comment
Closed

PNetlin.forward image normalization #9

roimehrez opened this issue Jun 13, 2018 · 1 comment

Comments

@roimehrez
Copy link

    def forward(self, in0, in1):
        in0_sc = (in0 - self.shift.expand_as(in0)) / self.scale.expand_as(in0)
        in1_sc = (in1 - self.shift.expand_as(in0)) / self.scale.expand_as(in0)

        if (self.pnet_tune):
            outs0 = self.net.forward(in0)
            outs1 = self.net.forward(in1)
        else:
            outs0 = self.net[0].forward(in0)
            outs1 = self.net[0].forward(in1)

Why you don't use in0_sc to feed the net? Is it a bug or a feature?

@richzhang
Copy link
Owner

richzhang commented Jun 14, 2018

That is a bug! Thank you for the catch! I am re-running the experiments right now. The results do not change much. I'll fix the bug and release new weights.

In the meantime, you can fix the bug and retrain yourself by running bash train_test_metric.sh as well.

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

2 participants