pub struct OcrGraphBuilder {
pub hir: HirModule,
pub params: HashMap<String, Vec<f32>>,
/* private fields */
}Fields§
§hir: HirModule§params: HashMap<String, Vec<f32>>Implementations§
Source§impl OcrGraphBuilder
impl OcrGraphBuilder
pub fn new(name: &str) -> OcrGraphBuilder
pub fn m(&mut self) -> HirMut<'_>
pub fn zero_bias(&mut self, channels: usize) -> Result<HirNodeId, Error>
pub fn load_param( &mut self, wm: &mut WeightMap, key: &str, ) -> Result<HirNodeId, Error>
pub fn load_param_optional( &mut self, wm: &mut WeightMap, key: &str, ) -> Result<Option<HirNodeId>, Error>
pub fn finish(self) -> Result<(Graph, HashMap<String, Vec<f32>>), Error>
Auto Trait Implementations§
impl Freeze for OcrGraphBuilder
impl RefUnwindSafe for OcrGraphBuilder
impl Send for OcrGraphBuilder
impl Sync for OcrGraphBuilder
impl Unpin for OcrGraphBuilder
impl UnsafeUnpin for OcrGraphBuilder
impl UnwindSafe for OcrGraphBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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