pub struct BigDet<B>where
B: Backend,{ /* private fields */ }Implementations§
Source§impl<B> BigDet<B>where
B: Backend,
impl<B> BigDet<B>where
B: Backend,
pub fn new(cfg: BigDetConfig, device: &<B as Backend>::Device) -> BigDet<B>
pub fn forward(&self, input: Tensor<B, 2>) -> Tensor<B, 2>
Sourcepub fn forward_multibox(
&self,
input: Tensor<B, 2>,
) -> (Tensor<B, 3>, Tensor<B, 2>)
pub fn forward_multibox( &self, input: Tensor<B, 2>, ) -> (Tensor<B, 3>, Tensor<B, 2>)
Multibox forward: returns (boxes, scores) with shape [B, max_boxes, 4] and [B, max_boxes]. Boxes/scores are passed through sigmoid to keep them in a stable range.
Trait Implementations§
Source§impl<B> AutodiffModule<B> for BigDet<B>
impl<B> AutodiffModule<B> for BigDet<B>
Source§type InnerModule = BigDet<<B as AutodiffBackend>::InnerBackend>
type InnerModule = BigDet<<B as AutodiffBackend>::InnerBackend>
Inner module without auto-differentiation.
Source§fn valid(&self) -> <BigDet<B> as AutodiffModule<B>>::InnerModule
fn valid(&self) -> <BigDet<B> as AutodiffModule<B>>::InnerModule
Get the same module, but on the inner backend without auto-differentiation.
Source§impl<B> Module<B> for BigDet<B>where
B: Backend,
impl<B> Module<B> for BigDet<B>where
B: Backend,
Source§type Record = BigDetRecord<B>
type Record = BigDetRecord<B>
Type to save and load the module.
Source§fn load_record(self, record: <BigDet<B> as Module<B>>::Record) -> BigDet<B>
fn load_record(self, record: <BigDet<B> as Module<B>>::Record) -> BigDet<B>
Load the module state from a record.
Source§fn into_record(self) -> <BigDet<B> as Module<B>>::Record
fn into_record(self) -> <BigDet<B> as Module<B>>::Record
Convert the module into a record containing the state.
Source§fn num_params(&self) -> usize
fn num_params(&self) -> usize
Get the number of parameters the module has, including all of its sub-modules.
Source§fn visit<Visitor>(&self, visitor: &mut Visitor)where
Visitor: ModuleVisitor<B>,
fn visit<Visitor>(&self, visitor: &mut Visitor)where
Visitor: ModuleVisitor<B>,
Visit each tensor parameter in the module with a visitor.
Source§fn map<Mapper>(self, mapper: &mut Mapper) -> BigDet<B>where
Mapper: ModuleMapper<B>,
fn map<Mapper>(self, mapper: &mut Mapper) -> BigDet<B>where
Mapper: ModuleMapper<B>,
Map each tensor parameter in the module with a mapper.
Source§fn collect_devices(
&self,
devices: Vec<<B as Backend>::Device>,
) -> Vec<<B as Backend>::Device>
fn collect_devices( &self, devices: Vec<<B as Backend>::Device>, ) -> Vec<<B as Backend>::Device>
Return all the devices found in the underneath module tree added to the given vector
without duplicates.
Source§fn to_device(self, device: &<B as Backend>::Device) -> BigDet<B>
fn to_device(self, device: &<B as Backend>::Device) -> BigDet<B>
Move the module and all of its sub-modules to the given device. Read more
Source§fn fork(self, device: &<B as Backend>::Device) -> BigDet<B>
fn fork(self, device: &<B as Backend>::Device) -> BigDet<B>
Fork the module and all of its sub-modules to the given device. Read more
Source§fn devices(&self) -> Vec<<B as Backend>::Device>
fn devices(&self) -> Vec<<B as Backend>::Device>
Return all the devices found in the underneath module tree without duplicates.
Source§fn save_file<FR, PB>(
self,
file_path: PB,
recorder: &FR,
) -> Result<(), RecorderError>
fn save_file<FR, PB>( self, file_path: PB, recorder: &FR, ) -> Result<(), RecorderError>
Save the module to a file using the provided file recorder. Read more
Source§fn load_file<FR, PB>(
self,
file_path: PB,
recorder: &FR,
device: &<B as Backend>::Device,
) -> Result<Self, RecorderError>
fn load_file<FR, PB>( self, file_path: PB, recorder: &FR, device: &<B as Backend>::Device, ) -> Result<Self, RecorderError>
Load the module from a file using the provided file recorder. Read more
Source§fn quantize_weights(self, quantizer: &mut Quantizer) -> Self
fn quantize_weights(self, quantizer: &mut Quantizer) -> Self
Quantize the weights of the module.
Source§impl<B> ModuleDisplay for BigDet<B>where
B: Backend,
impl<B> ModuleDisplay for BigDet<B>where
B: Backend,
Source§fn format(&self, passed_settings: DisplaySettings) -> String
fn format(&self, passed_settings: DisplaySettings) -> String
Formats the module with provided display settings. Read more
Source§fn custom_settings(&self) -> Option<DisplaySettings>
fn custom_settings(&self) -> Option<DisplaySettings>
Custom display settings for the module. Read more
Auto Trait Implementations§
impl<B> !Freeze for BigDet<B>
impl<B> !RefUnwindSafe for BigDet<B>
impl<B> Send for BigDet<B>
impl<B> !Sync for BigDet<B>
impl<B> Unpin for BigDet<B>where
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
<B as Backend>::Device: Unpin,
impl<B> !UnwindSafe for BigDet<B>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more