longhoangphi225 / multisample-hypernetworks Goto Github PK
View Code? Open in Web Editor NEW[AAAI-23] Improving Pareto Front Learning via Multi-Sample Hypernetworks
License: MIT License
[AAAI-23] Improving Pareto Front Learning via Multi-Sample Hypernetworks
License: MIT License
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!
MultiSample-Hypernetworks/Jura/trainer.py
Lines 158 to 160 in 17aca2c
We see in this block that penalty[0] term in direction_loss
will always be removed?
is there a reason? or is it an error?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.