Xi Wang

Results 43 comments of Xi Wang

@MansMeg Happy to open a PR to fix it, but I am not sure how to check the equivalence of log_density, could you provide some instruction on it? Thanks

@MansMeg Thanks! I will have a look

This example looks pretty interesting to me. I believe the *model* could implemented like this ? ```python def model(X, y): N, d = X.shape pi = numpyro.param('pi', np.ones((d,)) * 0.5,...

Hi @fehiepsi My knowledge on spike and slab prior mostly comes from : Eq 11 in https://arxiv.org/pdf/1810.04045.pdf I will take a look at the more authentic spike and slab prior...

@fehiepsi ```python def model(X, y): N, d = X.shape with numpyro.plate('d', d): pi = numpyro.sample('pi', dist.Beta(0.5, 0.5)) xi = numpyro.sample('xi', dist.Bernoulli(probs=pi)) w = numpyro.sample('w', dist.Normal(0., 10.0)) return numpyro.sample('obs', dist.Normal(np.dot(X, w...

@eb8680 Does it mean that, discrete variables (if enumerated) cannot be used inside the plate ? Actually, when I print out the shape of `xi`, it was `(2, 1)`, which...

@eb8680 I also tried moving `xi` outside the plate, however, the shape of `xi` printed out is still `(2, 1)` ```python def model(X, y): N, d = X.shape with numpyro.plate('d',...

@eb8680 Now I get what you mean, enumerating a **d** dimensional Bernoulli vector would inevitably cost O(2^d) right?

@fehiepsi I just read https://github.com/pyro-ppl/numpyro/issues/779 , I guess the current "work around" would be to manually declare the plate's dimension (tensor.expand) combined with a for loop, right?

When using Haiku together with TensorFlow datasets (tfds), I find it helpful to set `TF_FORCE_GPU_ALLOW_GROWTH=true` such that TF wouldn't preallocate loads of GPU memory.