Giter Club home page Giter Club logo

multisample-hypernetworks's People

Contributors

longhoangphi225 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

multisample-hypernetworks's Issues

A question about the sampling method

Hi @longhoangphi225,

Thank you for your excellent code! It really helps me a lot!

I have a question regarding the sampling method. In your paper (line 2-5 of Algorithm 1, https://arxiv.org/pdf/2212.01130.pdf),
partition sampling is only used when J (the number of objectives) is large than 2; otherwise the Dir sampling is used.

But it seems that in your code, when J=2, the sampling method is uniform, https://github.com/longhoangphi225/MultiSample-Hypernetworks/blob/main/Toy_Examples/MH_1.ipynb

for i in range(n_mo_sol):
      random = np.random.uniform(start, end)
      #random = np.random.uniform(start + i*(end-start)/head, start+ (i+1)*(end-start)/head)
      ray = np.array([np.cos(random),
                        np.sin(random)], dtype='float32')

while J>2, the sampling method seems to be a combination of Dirichlet and partition sampling? https://github.com/longhoangphi225/MultiSample-Hypernetworks/blob/main/Toy_Examples/MH_4.ipynb

  test_rays = get_reference_directions("das-dennis", 3, n_partitions=5).astype(
        np.float32
    )

for j in range(n_mo_sol):
      ray = np.random.dirichlet([1/3]*3, 1).astype(np.float32)
      ray = ray@test_rays[partition[j]]
      ray /= np.sum(ray)
      ray = ray.astype(np.float32)
      rays.append(torch.from_numpy(
                      ray.flatten()
                  ).to(device))  

Are these typos?

Also, I am wondering whether you could give me some explainations on ray = ray@test_rays[partition[j]], why sampling from dirichlet needs to be multiplied by partition sampling?

Thanks so much in advance!

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.