Coder Social home page Coder Social logo

Comments (12)

Maclory avatar Maclory commented on August 30, 2024

Yes, it does~

from spsr.

Feihong-cc avatar Feihong-cc commented on August 30, 2024

oh,but I saw the requires_grad = False of weight_h and weight_v written in the /model/SPSR_model.py code, why is that?

from spsr.

Maclory avatar Maclory commented on August 30, 2024

We use a convolutional layer with fixed kernels to extract gradient maps, which is the reason why we set require_grad=False for weight_h and weight_v. However, the parameters of the gradient branch are updated by back-propagation as normal.

from spsr.

Feihong-cc avatar Feihong-cc commented on August 30, 2024

Therefore, in the process of back propagation, the pixel value of image is optimized rather than the weight of the filter?

from spsr.

Maclory avatar Maclory commented on August 30, 2024

Yes.

from spsr.

Feihong-cc avatar Feihong-cc commented on August 30, 2024

Thank you very much! I also want to know that the gradient branch is passed into the SR branch using torch.cat((grad,sr),dim=1), what is the difference between this (grad+sr)?

from spsr.

Maclory avatar Maclory commented on August 30, 2024

The former is concatenation in dimensions while the latter is addition in values.

from spsr.

Feihong-cc avatar Feihong-cc commented on August 30, 2024

oh, no~ I mean to use torch.cat((grad,sr),dim=1) and (grad+sr) and then send it to the convolutional layer. What is the difference?

from spsr.

Maclory avatar Maclory commented on August 30, 2024

I think concatenation is better since it may contain the situation of addition. However, I think both are reasonable and you can have a try to see which is better.

from spsr.

Feihong-cc avatar Feihong-cc commented on August 30, 2024

Great! thank you for your reply !My idea is that the gradient contains the high frequency information of the image. After the gradient branch completed, we should be added the output gradient to SR, which is used the (grad+SR) operation, to enhance the high frequency information of sr , so restoring the sharpness of the image. As you said, the concatenation may contain the situation of addition, it's okay to use the concatenation.

from spsr.

Maclory avatar Maclory commented on August 30, 2024

:-)

from spsr.

hyperparameters avatar hyperparameters commented on August 30, 2024

@Florrie-Giu did you try with addition (grad+SR), I was also thinking in a similar direction.
Adding will increase the high freq details and thus improve the sharpness

from spsr.

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.