Coder Social home page Coder Social logo

Comments (5)

christopher-beckham avatar christopher-beckham commented on June 6, 2024 1

Hi @jingcx

If you look at the first gif, you can see 3 red points embedded in a 3d latent space, let's call them h1, h2, and h3. What is happening is that at each frame of the video, a blue point is generated by sampling some h_i and h_j (where i,j can be either of the 3) and generating interpolations between them by sampling a random alpha from a uniform(0,1) and computing h_mix = alpha*h_i + (1-alpha)*h_j. The concept also applies to higher dimensional spaces if the h's were not in 3 dimensions -- you're just interpolating along a line whose endpoints are defined by h_i and h_j.

In the second gif, you are interpolating along 3 points at the same time, so that would be computing something like h_mix = alpha1*h1 + alpha2*h2 + alpha3*h3, where all those alphas sum to 1 (you can sample these alphas by using a Dirichlet distribution). In this case however, we are interpolating between triplets. This corresponds to interpolating within a triangle whose vertices are determined by h1,h2,h3. If we were doing 4 points instead, you'd be interpolating within a tetrahedron, etc. (Also see this for reference: https://en.wikipedia.org/wiki/Simplex)

The Bernoulli example is a bit less intuitive, it's not doing interpolation within line segments but something else which is more akin to extrapolation.

If it's still unclear, I would suggest you write a little example and use matplotlib (with 3d scatterplots) to visualise the types of interpolations you can do.

hth

from amr.

jingcx avatar jingcx commented on June 6, 2024 1

@christopher-beckham
Your explanation is very clear, and thank you so much for your patient!

from amr.

christopher-beckham avatar christopher-beckham commented on June 6, 2024

Hi,

I generated the frames manually with matplotlib (a new interpolated point is added in each frame), and used ffmpeg to compile an mp4 out of the images.

from amr.

jingcx avatar jingcx commented on June 6, 2024

hello, I still confusing about the 3-D plots showed in the paper, which were represented as mixup/triplet mixup/Bernoulli mixup. Can you explain how to interpret these mixup methods as interpolating along line segments.
Thanks!

from amr.

christopher-beckham avatar christopher-beckham commented on June 6, 2024

It's probably worth me putting up a Colab notebook of my own code that generated the figures. I will get to that shortly.

from amr.

Related Issues (4)

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.