ma921 / sober Goto Github PK
View Code? Open in Web Editor NEWFast Bayesian optimization, quadrature, inference over arbitrary domain with GPU parallel acceleration
License: BSD 3-Clause "New" or "Revised" License
Fast Bayesian optimization, quadrature, inference over arbitrary domain with GPU parallel acceleration
License: BSD 3-Clause "New" or "Revised" License
When running BASQ on a SOBER-optimized model for further calculations, sometimes a cryptic error shows up:
Traceback (most recent call last):
MAP = basq.MAP(map_samples)
File "sober/BASQ/_basq.py", line 135, in MAP
samples = self.sampler.sample(n_samples)
File "sober/_sampler.py", line 427, in sample
samples = torch.vstack([samples_wkde, samples_prior])
RuntimeError: Sizes of tensors must match except in dimension 0. Expected size 0 but got size 5 for tensor number 1 in the list.
I printed the shapes of samples_wkde
and samples_prior
(in that order) to look at what happens here. When everything runs well, the output looks like this:
Expected log marginal likelihood: 8.68782e+00
Variance log marginal likelihood: -1.30538e+01
torch.Size([995, 5]) torch.Size([0, 5])
torch.Size([39, 5]) torch.Size([0, 5])
This is when I only run one SOBER iteration. But when I run 10 iterations, afterwards the output is:
Expected log marginal likelihood: 7.21550e+00
Variance log marginal likelihood: -1.73687e+01
torch.Size([618, 5]) torch.Size([0, 5])
torch.Size([0]) torch.Size([0, 5])
Which obviously can't be stacked.
I have two questions. Why is samples_prior
always empty? And why is samples_wkde
sometimes shaped wrongly?
Settings to reproduce: run SOBER with the following sample sizes for 1 or 10 iterations:
Assume I have a 4D categorical variable ranges in [[0,1], [0,1], [0,1,2,3,4], [0,1,2]], how should I define the categorical prior on this variable and pass into SOBER? As I know, each row in a torch.Tensor must has same dimesions.
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.