Closed tonyk7440 closed 3 years ago
batch_size()
defaults to a log2 transformation. This is the reason you are getting the error because batch_size()
tried to create integers between 2^32
and 2^64
both of which are above the integer limit of your machine
.Machine$integer.max
#> [1] 2147483647
2^32
#> [1] 4294967296
If you want the range to be between 32 and 64, you can set the range to be c(5, 6)
.
library(dials)
#> Loading required package: scales
grid_spec_deep_ar <- grid_latin_hypercube(
parameters(
epochs(c(10, 20)),
batch_size(range = c(5, 6))
),
size = 5
)
grid_spec_deep_ar
#> # A tibble: 5 × 2
#> epochs batch_size
#> <int> <int>
#> 1 12 50
#> 2 19 56
#> 3 13 36
#> 4 17 40
#> 5 14 44
Created on 2021-08-24 by the reprex package (v2.0.1)
Ah I see, you are right, that is great, thanks very much for the help! I'll close the issue
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
The problem
I'm trying to generate a parameter grid using the parameter
batch_size
, I know this has an unknown range likemtry
so I thought defining a range would work but it seems like the numbers are encountering a possible coercion problem and producing a column of NA's, not sure if it is a bug?Reproducible example
Created on 2021-08-24 by the reprex package (v2.0.1)