| plot.citoarchitecture | R Documentation |
This method provides a visual representation of the network architecture defined by an object of class citoarchitecture, including information about each layer's configuration. It helps in understanding the structure of the architecture defined by create_architecture.
## S3 method for class 'citoarchitecture'
plot(x, input_shape, output_shape = NULL, ...)
x |
An object of class |
input_shape |
A numeric vector specifying the dimensions of a single sample (e.g., |
output_shape |
An integer specifying the number of nodes in the output layer. If |
... |
Additional arguments (currently not used). |
The original citoarchitecture object, returned invisibly.
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
plot(architecture, c(3,128,128), 10)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.