error when thinning with lots of bad samples in mcmc
Open
bug
samplers
- Dominant language
- C++
- Stars
- 607
- Forks
- 67
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 1
Description
When there are lots of bad samples in the warmup period of an `mcmc()` call, and the user requests thinning, a tensorflow error often appears:
```r
library(greta)
set.seed(1)
x <- rnorm(10000, 1e6, 1)
z <- normal(-1e6, 1e-6)
distribution(x) <- normal(z, 1e6)
m <- model(z, precision = "single")
draws <- mcmc(m, n_samples = 10, warmup = 20, thin = 20)
```
> ```
> Error: greta hit a tensorflow error:
> Error in py_call_impl(callable, dots$args, dots$keywords): UnimplementedError: TensorArray > has size zero, but element shape [?,1] is not fully defined. Currently only static shapes > are supported when packing zero-size
> ```
Contributor guide
Assessment
This issue has not been assessed yet.