Giter VIP home page Giter VIP logo

Comments (6)

czq142857 avatar czq142857 commented on August 21, 2024

image
The leaky clamp operation looks like this. As you see, the problem you described does not exist.

Personally, I prefer piece-wise linear activation functions, which is why I usually use leaky ReLU or leaky clamp. Since I use leaky clamp in the output layer (instead of sigmoid), there will be negative values in the outputs, therefore BCE cannot be applied.

from im-net-pytorch.

XuHQ1997 avatar XuHQ1997 commented on August 21, 2024

Oh, sorry~ I just confused loss and gradient.
The gradient may be greater when the prediction is closer to 1. Emm...It seems not a big problem, right?
图片1

Thanks for your reply.

from im-net-pytorch.

czq142857 avatar czq142857 commented on August 21, 2024

When computing the gradient, you need to consider the ground truth. The gradients you showed on the figure seem to assume the ground truth is 1.

It is actually better to consider the gradient as the product of the gradient from MSE and the constant gradient (1 or 0.01) from this piece-wise linear function.

from im-net-pytorch.

XuHQ1997 avatar XuHQ1997 commented on August 21, 2024

Yes, you'r right. Because negative samples are much more than the positive samples, I guess the network would struggle to learn the positive samples. So I discussed about the positive samples. And I wonder whether the imbalance between positive and negative samples is the main reason for which we need train the network so long.

from im-net-pytorch.

czq142857 avatar czq142857 commented on August 21, 2024

I would consider the network structure as the main reason, i.e., the continuity/smoothness of the functions represented by MLPs.

from im-net-pytorch.

XuHQ1997 avatar XuHQ1997 commented on August 21, 2024

Ok. Thanks for your patient :)

from im-net-pytorch.

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.