pub struct LunaEncoder<B: Backend> {
pub model_cfg: ModelConfig,
pub data_cfg: DataConfig,
/* private fields */
}Expand description
LUNA encoder for EEG signal processing.
Fields§
§model_cfg: ModelConfig§data_cfg: DataConfigImplementations§
Source§impl<B: Backend> LunaEncoder<B>
impl<B: Backend> LunaEncoder<B>
Sourcepub fn load(
config_path: &Path,
weights_path: &Path,
device: B::Device,
) -> Result<(Self, f64)>
pub fn load( config_path: &Path, weights_path: &Path, device: B::Device, ) -> Result<(Self, f64)>
Load model from config.json and weights safetensors.
pub fn describe(&self) -> String
Sourcepub fn run_batch(&self, batch: &InputBatch<B>) -> Result<EpochEmbedding>
pub fn run_batch(&self, batch: &InputBatch<B>) -> Result<EpochEmbedding>
Run inference on a prepared InputBatch.
Sourcepub fn run_batches(
&self,
batches: &[InputBatch<B>],
) -> Result<Vec<EpochEmbedding>>
pub fn run_batches( &self, batches: &[InputBatch<B>], ) -> Result<Vec<EpochEmbedding>>
Run on multiple batches.
pub fn device(&self) -> &B::Device
Auto Trait Implementations§
impl<B> !Freeze for LunaEncoder<B>
impl<B> !RefUnwindSafe for LunaEncoder<B>
impl<B> Send for LunaEncoder<B>
impl<B> !Sync for LunaEncoder<B>
impl<B> Unpin for LunaEncoder<B>where
<B as Backend>::Device: Unpin,
<B as Backend>::FloatTensorPrimitive: Unpin,
<B as Backend>::QuantizedTensorPrimitive: Unpin,
impl<B> UnsafeUnpin for LunaEncoder<B>where
<B as Backend>::Device: UnsafeUnpin,
<B as Backend>::FloatTensorPrimitive: UnsafeUnpin,
<B as Backend>::QuantizedTensorPrimitive: UnsafeUnpin,
impl<B> !UnwindSafe for LunaEncoder<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> 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