View source: R/customMetrics.R
weighted_categorical_crossentropy | R Documentation |
ported from this implementation:
weighted_categorical_crossentropy(y_true, y_pred, weights)
y_true |
True labels (Tensor) |
y_pred |
Predictions (Tensor of the same shape as |
weights |
weights for each class |
https://gist.github.com/wassname/ce364fddfc8a025bfab4348cf5de852d
function value
Tustison NJ
library( ANTsRNet )
library( keras )
model <- createUnetModel2D( c( 64, 64, 1 ), numberOfOutputs = 2 )
model %>% compile( loss = weighted_categorical_crossentropy( weights = c( 1, 1 ) ),
optimizer = optimizer_adam( lr = 0.0001 ),
metrics = "accuracy" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.