Enum rust_bert::pipelines::token_classification::TokenClassificationOption [−][src]
pub enum TokenClassificationOption {
Bert(BertForTokenClassification),
DistilBert(DistilBertForTokenClassification),
MobileBert(MobileBertForTokenClassification),
Roberta(RobertaForTokenClassification),
XLMRoberta(RobertaForTokenClassification),
Electra(ElectraForTokenClassification),
Albert(AlbertForTokenClassification),
XLNet(XLNetForTokenClassification),
Longformer(LongformerForTokenClassification),
FNet(FNetForTokenClassification),
}Expand description
Variants
Bert(BertForTokenClassification)
Tuple Fields
Bert for Token Classification
DistilBert(DistilBertForTokenClassification)
Tuple Fields
DistilBert for Token Classification
MobileBert(MobileBertForTokenClassification)
Tuple Fields
MobileBert for Token Classification
Roberta(RobertaForTokenClassification)
Tuple Fields
Roberta for Token Classification
XLMRoberta(RobertaForTokenClassification)
Tuple Fields
XLM Roberta for Token Classification
Electra(ElectraForTokenClassification)
Tuple Fields
Electra for Token Classification
Albert(AlbertForTokenClassification)
Tuple Fields
Albert for Token Classification
XLNet(XLNetForTokenClassification)
Tuple Fields
XLNet for Token Classification
Longformer(LongformerForTokenClassification)
Tuple Fields
Longformer for Token Classification
FNet(FNetForTokenClassification)
Tuple Fields
FNet for Token Classification
Implementations
pub fn new<'p, P>(
model_type: ModelType,
p: P,
config: &ConfigOption
) -> Result<Self, RustBertError> where
P: Borrow<Path<'p>>,
pub fn new<'p, P>(
model_type: ModelType,
p: P,
config: &ConfigOption
) -> Result<Self, RustBertError> where
P: Borrow<Path<'p>>,
Instantiate a new token sequence classification model of the supplied type.
Arguments
model_type-ModelTypeindicating the model type to load (must match with the actual data to be loaded)p-tch::nn::Pathpath to the model file to load (e.g. model.ot)config- A configuration (the model type of the configuration must be compatible with the value formodel_type)
Returns the ModelType for this TokenClassificationOption
Auto Trait Implementations
impl RefUnwindSafe for TokenClassificationOption
impl Send for TokenClassificationOption
impl !Sync for TokenClassificationOption
impl Unpin for TokenClassificationOption
impl UnwindSafe for TokenClassificationOption
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self
