View source: R/customMetrics.R
peak_signal_to_noise_ratio | R Documentation |
Function to calculate peak-signal-to-noise ratio.
peak_signal_to_noise_ratio(y_true, y_pred)
y_true |
True labels (Tensor) |
y_pred |
Predictions (Tensor of the same shape as |
PSNR value
Tustison NJ
library( ANTsRNet )
library( keras )
model <- createUnetModel2D( c( 64, 64, 1 ) )
metric_peak_signal_to_noise_ratio <-
custom_metric( "peak_signal_to_noise_ratio",
peak_signal_to_noise_ratio )
model %>% compile( loss = loss_categorical_crossentropy,
optimizer = optimizer_adam( lr = 0.0001 ),
metrics = c( metric_peak_signal_to_noise_ratio ) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.