We provide an overview of the tools that enable deep learning in R, including packages such as tensorflown keras, and tfestimators. Demos are included to show the API. We also discuss the latest features.
45. model <- keras_model_sequential() %>%
layer_dense(units = 8675309, input_shape = 1,
name = "parameters") %>%
layer_dense(units = 8675309) %>%
layer_lambda(f = k_exp) %>%
layer_distribution_lambda(tfd_poisson)
NOW YOU HAVE A DEEP NEURAL NET
46. model <- keras_model_sequential() %>%
layer_dense(units = 8675309, input_shape = 1,
name = "parameters") %>%
layer_dense_variational(
units = 1,
make_posterior_fn = posterior_mean_field,
make_prior_fn = prior_trainable,
kl_weight = 1 / n_rows,
activation = "linear"
) %>%
layer_lambda(f = k_exp) %>%
layer_distribution_lambda(tfd_poisson)
NOW YOUR MODEL IS A RANDOM
VARIABLE ZOMG
54. Things neural nets can help with
- Images (yeah, sometimes we get them)
- Natural language / Time series
- High dimensional categorical predictors
- Multi-task learning, i.e. when we want to predict
multiple outputs with a single model
- Combining different types of inputs into the same model
- Making predictions on devices without docker containers
(e.g. your phone)