Skip to main content

predict_logits

Function predict_logits 

Source
pub(super) fn predict_logits(
    data: &[f32],
    dims: [usize; 3],
    model: &OnnxModel,
    patch: [usize; 3],
    channels: usize,
    tile_step: f64,
    mirror_tta: bool,
    progress: impl FnMut(usize, usize),
) -> Result<Vec<f32>, OnnxError>
Expand description

Gaussian-weighted sliding-window logits of an nnU-Net-style network with channels outputs, channel-major C-order (shape [channels, dims...]). patch must be a size the network accepts; tile_step is the stride as a fraction of the patch; mirror_tta averages over the 8 axis mirrorings. Shared with super::rs2net.