pub struct DetectDecodeOp<D: FloatBytes + Send + Sync + 'static> {
pub anchor_x: Vec<f32>,
pub anchor_y: Vec<f32>,
pub strides: Vec<f32>,
pub block_a: i32,
/* private fields */
}Expand description
Graph-level representation of the detect_decode op.
Stores precomputed anchor grid and stride data used to build the
DetectDecodeRuntimeOp at lowering time via CustomOp::lower().
Fields§
§anchor_x: Vec<f32>Anchor point x-coordinates, one per anchor.
anchor_y: Vec<f32>Anchor point y-coordinates, one per anchor.
strides: Vec<f32>Per-anchor stride (8/16/32 for the respective FPN scale).
block_a: i32Kernel launch block size along the anchor dimension.
Implementations§
Trait Implementations§
Source§impl<D: FloatBytes + Send + Sync + 'static> CustomOp for DetectDecodeOp<D>
impl<D: FloatBytes + Send + Sync + 'static> CustomOp for DetectDecodeOp<D>
Source§fn infer_output_shape(&self, input_shapes: &[&Shape]) -> Shape
fn infer_output_shape(&self, input_shapes: &[&Shape]) -> Shape
Compute the output shape given the shapes of all input tensors in order.
Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Expose
self as &dyn Any so the custom lowering can downcast to the
concrete op type. Implement as fn as_any(&self) -> &dyn Any { self }.Source§fn lower(&self) -> Option<(String, String, String, Arc<dyn RuntimeOp>)>
fn lower(&self) -> Option<(String, String, String, Arc<dyn RuntimeOp>)>
Return kernel lowering info so
TritonLowering can compile this op
without a project-specific middleware. Return None to keep the
existing middleware / error behaviour. Read more§fn lower_backward_source(&self) -> String
fn lower_backward_source(&self) -> String
Return the backward kernel source for this op (used in training mode).
Return an empty string if this op has no backward pass.
Auto Trait Implementations§
impl<D> Freeze for DetectDecodeOp<D>
impl<D> RefUnwindSafe for DetectDecodeOp<D>where
D: RefUnwindSafe,
impl<D> Send for DetectDecodeOp<D>
impl<D> Sync for DetectDecodeOp<D>
impl<D> Unpin for DetectDecodeOp<D>where
D: Unpin,
impl<D> UnsafeUnpin for DetectDecodeOp<D>
impl<D> UnwindSafe for DetectDecodeOp<D>where
D: UnwindSafe,
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