Description Usage Arguments Value Author(s) See Also Examples
You are allowed to create a visualization of your model architecture. This architecture displays the information about the name, input shape, and output shape of layers in a flowchart.
1 | plot_model(x)
|
x |
deep learning model |
plot for the model architecture
Dongmin Jung
purrr::map, purrr::map_chr, purrr::pluck, purrr::imap_dfr, DiagrammeR::grViz
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(reticulate)
if (keras::is_keras_available() & reticulate::py_available()) {
inputs1 <- layer_input(shape = c(1000))
inputs2 <- layer_input(shape = c(1000))
predictions1 <- inputs1 %>%
layer_dense(units = 128, activation = 'relu') %>%
layer_dense(units = 64, activation = 'relu') %>%
layer_dense(units = 32, activation = 'softmax')
predictions2 <- inputs2 %>%
layer_dense(units = 128, activation = 'relu') %>%
layer_dense(units = 64, activation = 'relu') %>%
layer_dense(units = 32, activation = 'softmax')
combined <- layer_concatenate(c(predictions1, predictions2)) %>%
layer_dense(units = 16, activation = 'softmax')
model <- keras_model(inputs = c(inputs1, inputs2),
outputs = combined)
plot_model(model)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.