Enum rust_bert::pipelines::question_answering::QuestionAnsweringOption [−][src]
pub enum QuestionAnsweringOption {
Bert(BertForQuestionAnswering),
DistilBert(DistilBertForQuestionAnswering),
MobileBert(MobileBertForQuestionAnswering),
Roberta(RobertaForQuestionAnswering),
XLMRoberta(RobertaForQuestionAnswering),
Albert(AlbertForQuestionAnswering),
XLNet(XLNetForQuestionAnswering),
Reformer(ReformerForQuestionAnswering),
Longformer(LongformerForQuestionAnswering),
FNet(FNetForQuestionAnswering),
}Expand description
Variants
Bert(BertForQuestionAnswering)
Tuple Fields
Bert for Question Answering
DistilBert(DistilBertForQuestionAnswering)
Tuple Fields
DistilBert for Question Answering
MobileBert(MobileBertForQuestionAnswering)
Tuple Fields
MobileBert for Question Answering
Roberta(RobertaForQuestionAnswering)
Tuple Fields
Roberta for Question Answering
XLMRoberta(RobertaForQuestionAnswering)
Tuple Fields
XLMRoberta for Question Answering
Albert(AlbertForQuestionAnswering)
Tuple Fields
Albert for Question Answering
XLNet(XLNetForQuestionAnswering)
Tuple Fields
XLNet for Question Answering
Reformer(ReformerForQuestionAnswering)
Tuple Fields
Reformer for Question Answering
Longformer(LongformerForQuestionAnswering)
Tuple Fields
Longformer for Question Answering
FNet(FNetForQuestionAnswering)
Tuple Fields
FNet for Question Answering
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 question answering 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 SequenceClassificationOption
Auto Trait Implementations
impl RefUnwindSafe for QuestionAnsweringOption
impl Send for QuestionAnsweringOption
impl !Sync for QuestionAnsweringOption
impl Unpin for QuestionAnsweringOption
impl UnwindSafe for QuestionAnsweringOption
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
