\donttest{
if(torch::torch_is_installed()){
library(cito)
c1 <- conv(n_kernels = 8, kernel_size = 5)
c2 <- conv(n_kernels = 16, kernel_size = 3)
l <- linear(n_neurons = 100)
mP <- maxPool(kernel_size = 2)
architecture <- create_architecture(c1, c1, mP, c2, c2, mP, l,
default_dropout = list(linear=0.6, conv=0.4),
default_normalization = list(linear=TRUE),
default_activation = "selu")
# See how the finished CNN would look like for specific input and output shapes
print(architecture, c(3,128,128), 10)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.