Giter VIP home page Giter VIP logo

Comments (5)

yuval-alaluf avatar yuval-alaluf commented on June 15, 2024 2

The input of self.pretrained_encoder() is x[:,: -1,:,:]. However, I think the input of self.pretrained_encoder() should be the same as the input of self.encode(). So it should be x, not x[:,: -1,:,:]. Am I mistaken? Thanks.

This part is a bit tricky.
So in the following line,

codes = self.encoder(x)

we pass the input x into our SAM encoder. Here, x is the 4-channel input (the RGB image and the constant channel representing the target age).
In the line you linked, we actually want to pass only the RGB channels to the pre-trained pSp encoder (in order to extract the input's latent code). Therefore, I take only the first three channels if x when calling self.pretrained_encoder(...).
Does that make sense?

from sam.

yuval-alaluf avatar yuval-alaluf commented on June 15, 2024 1

Hi @datbu178 ,
It seems like you're correct on both points. When I refactored the code before publishing I guess I missed a few small points. Thanks for pointing this out!
I'll make the fixes as soon as possible.

from sam.

datbu178 avatar datbu178 commented on June 15, 2024 1

Oh, I had a mistake. I understand now. Thank you very much for explaining it!

from sam.

yuval-alaluf avatar yuval-alaluf commented on June 15, 2024

Hi @datbu178 ,
I just pushed an update with the two points you posted above so I hope the issues are now fixed. Please see 30ce1af
If you still think there is still an issue please feel free to let me know.
Thanks again for bringing this to my attention!

from sam.

datbu178 avatar datbu178 commented on June 15, 2024

Dear @yuval-alaluf ,
Thank you for the answer. Yes, I think two issues are now fixed!

I just have another question in the following line of code:

encoded_latents = self.pretrained_encoder(x[:, :-1, :, :])

The input of self.pretrained_encoder() is x[:,: -1,:,:]. However, I think the input of self.pretrained_encoder() should be the same as the input of self.encode(). So it should be x, not x[:,: -1,:,:]. Am I mistaken? Thanks.

from sam.

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.