| ag_batch_norm | R Documentation |
Normalises each feature (row) over the batch dimension.
Learnable scale gamma [F,1] and shift beta [F,1].
ag_batch_norm(num_features, eps = 1e-05, momentum = 0.1)
num_features |
Number of features (rows of input) |
eps |
Numerical stability constant (default 1e-5) |
momentum |
Running-stats momentum (default 0.1) |
Training mode: use batch statistics; update running mean/var. Eval mode: use stored running statistics.
An ag_batch_norm environment
bn <- ag_batch_norm(16L)
x <- ag_tensor(matrix(rnorm(16 * 32), 16, 32))
out <- bn$forward(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.