pub struct BertEncoderLayerSpec {
pub layer_prefix: String,
pub qkv_style: BertQkvStyle,
pub hidden_size: usize,
pub num_heads: usize,
pub head_dim: usize,
pub eps: f32,
pub attention_mask_input: String,
}Fields§
§layer_prefix: String§qkv_style: BertQkvStyle§num_heads: usize§head_dim: usize§eps: f32§attention_mask_input: StringImplementations§
Source§impl BertEncoderLayerSpec
impl BertEncoderLayerSpec
pub fn hf( layer_prefix: impl Into<String>, qkv_style: BertQkvStyle, hidden_size: usize, num_heads: usize, eps: f32, ) -> BertEncoderLayerSpec
Trait Implementations§
Source§impl Clone for BertEncoderLayerSpec
impl Clone for BertEncoderLayerSpec
Source§fn clone(&self) -> BertEncoderLayerSpec
fn clone(&self) -> BertEncoderLayerSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BertEncoderLayerSpec
impl RefUnwindSafe for BertEncoderLayerSpec
impl Send for BertEncoderLayerSpec
impl Sync for BertEncoderLayerSpec
impl Unpin for BertEncoderLayerSpec
impl UnsafeUnpin for BertEncoderLayerSpec
impl UnwindSafe for BertEncoderLayerSpec
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