BNN.totparams | R Documentation |
Obtain the total parameters of the BNN
BNN.totparams(bnn)
bnn |
A BNN formed using |
The total number of parameters in the BNN
## Not run:
## Needs previous call to `BayesFluxR_setup` which is time
## consuming and requires Julia and BayesFlux.jl
BayesFluxR_setup(installJulia=TRUE, seed=123)
net <- Chain(Dense(5, 1))
like <- likelihood.feedforward_normal(net, Gamma(2.0, 0.5))
prior <- prior.gaussian(net, 0.5)
init <- initialise.allsame(Normal(0, 0.5), like, prior)
x <- matrix(rnorm(5*100), nrow = 5)
y <- rnorm(100)
bnn <- BNN(x, y, like, prior, init)
BNN.totparams(bnn)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.