| ag_sample_normal | R Documentation |
mu + exp(log_std) * eps with eps ~ N(0, 1) from
stats::rnorm (so set.seed reproduces it). Differentiable in
mu and log_std – the reparameterisation used by SAC; for PPO
collection the result is just the action.
ag_sample_normal(mu, log_std)
mu |
ag_tensor or numeric matrix, |
log_std |
ag_tensor or numeric matrix, |
log_std is either the shape of mu (state-dependent) or one
column [n, 1] broadcast over the batch (state-independent). On the GPU
mu and log_std stay on the device; only eps is uploaded.
ag_tensor [n, batch].
set.seed(1)
a <- ag_sample_normal(matrix(0, 2, 3), matrix(log(0.5), 2, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.