pub struct Output {
pub name: String,
pub output_type: TensorElementDataType,
pub dimensions: Vec<Option<u32>>,
}
Expand description
Information about an ONNX’s output as stored in loaded file
Fields§
§name: String
Name of the output layer
output_type: TensorElementDataType
Type of the output layer’s elements
dimensions: Vec<Option<u32>>
Shape of the output layer
C API uses a i64 for the dimensions. We use an unsigned of the same range of the positive values.
Implementations§
Source§impl Output
impl Output
Sourcepub fn dimensions(&self) -> impl Iterator<Item = Option<usize>> + '_
pub fn dimensions(&self) -> impl Iterator<Item = Option<usize>> + '_
Return an iterator over the shape elements of the output layer
Note: The member Output::dimensions
stores u32
(since ONNX uses i64
but which cannot be negative) so the
iterator converts to usize
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Output
impl RefUnwindSafe for Output
impl Send for Output
impl Sync for Output
impl Unpin for Output
impl UnwindSafe for Output
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more