Code Monkey home page Code Monkey logo

Comments (11)

hubert0527 avatar hubert0527 commented on August 20, 2024
  1. Oh, yes, it is a mistake, I never really read that values LoL
  2. Which configuration are you using? And what are your pytorch and cuda versions? I sometimes find certain versions have weird behaviors.

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

InfinityGAN.yaml
I create environment with the environment.yml in your project.
torch=1.6.0
cuda=10.1

from infinitygan.

hubert0527 avatar hubert0527 commented on August 20, 2024

That's weird. Could you run it a second or third time and see if that repeatedly happens?

And you may disable the diveristy_z_loss in the .yaml config to see if that indeed avoids the issue.
If the diversity loss indeed is the issue, you may replace the angular_similarity() function in line 238, 240, 251, 253 in generator with L1 or L2 distance such as:

# L1 distance
z_dist = (local_latent[0::2] - local_latent[1::2]).abs().mean()

Note: We originally use the angular one since the scale of distance in local latent space and feature space is different, and we observe a slight improvement with such a design. But the L1/L2 implementation should achieve a similar goal without numerical issues.

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

OK,I will try it.
tanks!

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

def forward(self, input, style, coords=None, calc_flops=False):

I'm sorry, but I have to ask you about a question.
I've debugged the code up to L580 (forward function), but I still don't understand what the implementation of Figure 3 (Padding-Free Generator) is.

x = torch.cat([x, coords], 1)

As I understand it, it's just concatenate feature and coords on channel dim.
But, How does it achieve the goal of seamless?

from infinitygan.

hubert0527 avatar hubert0527 commented on August 20, 2024

The coords are only used in the structure synthesizer. In the paper Figure 3, if you use other types of padding, the generator learns to rely on that positional information, and therefore the independently generated patches have different positional information compared to synthesizing at once. The padding-free generator removes that incorrect positional info from padding (no padding in the generator, but we still make sure it still maintains a large receptive field in the local latent space), and explicitly provides consistent positional info via the coordinates.

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

As shown in the fig3(b), the feature map seems padded by coords(XYZ), but in the code, coords and feature map are concatenated along channel dim. This is my puzzle. 😭

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

As shown in the fig3(b), the feature map seems padded by coords(XYZ), but in the code, coords and feature map are concatenated along channel dim. This is my puzzle. 😭

Sorry, in fig3, XYZ is mistaken for coords. XYZ are actually features.
But, how do you guarantee that patch A and B have the same XYZ?
In eq. (1), Zs = Gs(Zg, Zl, C),different patches share the same the global latent vector Zg,
and does all patches also have the same local latent vector Zl?
coords C are different for each local patch, and does coords C of adjacent patch have overlap at test time?

from infinitygan.

hubert0527 avatar hubert0527 commented on August 20, 2024

Yes, you are mostly correct.

does all patches also have the same local latent vector Zl?

Remind that Z_local is of shape [B, C, H, W] (which has the same shape/size as the coordinates, so you can think they are working in a similar way, but carrying different types of information), so they have overlaps between adjacent patches.

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

Yes, you are mostly correct.

does all patches also have the same local latent vector Zl?

Remind that Z_local is of shape [B, C, H, W] (which has the same shape/size as the coordinates, so you can think they are working in a similar way, but carrying different types of information), so they have overlaps between adjacent patches.

OK,thanks!

from infinitygan.

Amo5 avatar Amo5 commented on August 20, 2024

Hi,
Where is the code implementation for feature unfolding (eq.3)?

from infinitygan.

Related Issues (17)

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.