pub type SentimentConfig = SequenceClassificationConfig;
Aliased Type§
struct SentimentConfig {
pub model_type: ModelType,
pub model_resource: ModelResource,
pub config_resource: Box<dyn ResourceProvider + Send>,
pub vocab_resource: Box<dyn ResourceProvider + Send>,
pub merges_resource: Option<Box<dyn ResourceProvider + Send>>,
pub lower_case: bool,
pub strip_accents: Option<bool>,
pub add_prefix_space: Option<bool>,
pub device: Device,
pub kind: Option<Kind>,
}
Fields§
§model_type: ModelType
Model type
model_resource: ModelResource
Model weights resource (default: pretrained BERT model on CoNLL)
config_resource: Box<dyn ResourceProvider + Send>
Config resource (default: pretrained BERT model on CoNLL)
vocab_resource: Box<dyn ResourceProvider + Send>
Vocab resource (default: pretrained BERT model on CoNLL)
merges_resource: Option<Box<dyn ResourceProvider + Send>>
Merges resource (default: None)
lower_case: bool
Automatically lower case all input upon tokenization (assumes a lower-cased model)
strip_accents: Option<bool>
Flag indicating if the tokenizer should strip accents (normalization). Only used for BERT / ALBERT models
add_prefix_space: Option<bool>
Flag indicating if the tokenizer should add a white space before each tokenized input (needed for some Roberta models)
device: Device
Device to place the model on (default: CUDA/GPU when available)
kind: Option<Kind>
Model weights precision. If not provided, will default to full precision on CPU, or the loaded weights precision otherwise