Open antonioualex opened 1 year ago
Hello @antonioualex ,
For sequence classification, the easiest would be to use pipelines that take care of tokenization, batching and padding for you. Can you please check the example at https://github.com/guillaume-be/rust-bert/blob/master/examples/sequence_classification.rs that illustrates how to do this with a set of defaults. You can update the configuration to use a custom model instead (see for example https://github.com/guillaume-be/rust-bert/blob/master/examples/sentiment_analysis_fnet.rs)
Please let me know if this helps.
Hi guys, I'm trying to load a custom model with RobertaForSequenceClassification but I don't know how to "predict". I assume I have to use forward_t method, but I'm not sure how to and if that's the case. All I want to do is insert a text and receive a prediction. Bellow you can see my code.