ncnn_rust/net/output.rs
1//! Validated final outputs and their buffer boundaries.
2
3#[derive(Debug)]
4/// One requested output with independent storage.
5pub struct FinalOutput {
6 /// Shape and stride metadata of the extracted tensor.
7 pub info: crate::TensorInfo,
8 /// Logical FP32 elements without channel padding.
9 pub values: Vec<f32>,
10}
11impl FinalOutput {
12 /// Returns the tensor metadata.
13 pub fn info(&self) -> crate::TensorInfo {
14 self.info
15 }
16}
17/// Shape and boundary of one named output in a concatenated final buffer.
18#[derive(Debug)]
19pub struct OutputRange {
20 /// Blob name in request order.
21 pub name: String,
22 /// Shape and stride metadata of this output.
23 pub info: crate::TensorInfo,
24 /// Index range inside the concatenated buffer.
25 pub values: std::ops::Range<usize>,
26}