Description Usage Arguments Examples
Compile model.
1 2 | model_compile(brain, optimizer = NULL, loss = NULL,
metrics = "accuracy")
|
brain |
An object of class |
optimizer |
Optimizer function. |
loss |
A loss function. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
library(shiny)
ui <- fluidPage(brainyOutput("brainy"))
server <- function(input, output){
output$brainy <- renderBrainy({
brainy() %>%
layer_add(
layer_dense(units = 1)
) %>%
model_compile(
optimizer = "meanSquaredError",
loss = "sgd"
)
})
}
shinyApp(ui, server)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.