Questions tagged [distilbert]
37 questions
0
votes
0 answers
Receiving Error When trying to Tokenize Dataset with Distilbert
I am totally new to all of this. I have just started using huggingface, and I am trying to use the DistilBert model.
I was following along a textbook that shows how to tokenize and then run it through DistilBert model. The dataset they used was one…
0
votes
0 answers
ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type list) (I have created a eclipse first)
When I'm passing freq_representation in the .predict function,its giving me error ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type list).How to solve it?
(Look at the bottom half of the code). I have attached the full…

S. D. chowdhury
- 45
- 5
0
votes
1 answer
TextEncodeInput must be Union[TextInputSequence, Tuple[InputSequence, InputSequence]] while Trying to Tokenize
I encounter some problems when trying to tokenize using distilBert. I use Jupyter Notebook.
Here's my full code
maxlen = 50
#tokens
maxqnans = np.int((maxlen-20)/2)
corpus_tokenized = ["[CLS] "+
"…

ccc
- 1
- 1
0
votes
0 answers
DistilBERT Classification Output - "TypeError: only size-1 arrays can be converted to Python scalars"
I trained a DistilBERT model from Huggingface for classification with 3 labels (Claim, Premise, Non-Arg) and saved the model as a .h5 file.
When I try to deploy the saved model on a server, tokenize the text and create a prediction with the model, I…

Philipp
- 11
- 1
0
votes
1 answer
How to do cross validation in DistilBERT
I have made a simple model to do text classification using DistilBERT. The problem is I am unable to figure out how to do cross-validation while training. My code implementation is provided below.
Can anyone help me to implement cross-validation…

RajB009
- 417
- 2
- 7
- 19
0
votes
1 answer
How to predict on a test sequence using a distilbert model?
Im trying to predict on a test sequence using Ktrain with a distilbert model, my code looks like this:
trn, val, preproc = text.texts_from_array(x_train=x_train, y_train=y_train,
x_test=x_test,…

blue59856
- 21
- 4
0
votes
1 answer
distilbert model is not working at ktrain
I tried to use distilbert classifier. but I am getting the following error.
This is my code
(X_train,y_train),(X_test,y_test),prepro…