Questions tagged [ktrain]

ktrain is a lightweight python wrapper for the deep learning library TensorFlow Keras (and other libraries) to help build, train, and deploy neural networks and other machine learning models. Github: https://github.com/amaiya/ktrain

25 questions
0
votes
0 answers

what is the meaning of this error using ktrain with preprocessing train function using python with deep learning

i am trying to use deep learning model in order to create sentiment analysis project. For this i am using the ktrain package but the problem is in the preprocess_train() The above function takes as parameters def preprocess_train(texts, y=None,…
DevLeb2022
  • 653
  • 11
  • 40
0
votes
0 answers

using SMOTE to balance the dataset with ktrain package

I have a classification project for this i am using ktrain & Bert with an imbalance dataset for this i used SMOTE after splitting the dataset into training and test the problem is that when i tried to oversample the dataset it crash and display the…
DevLeb2022
  • 653
  • 11
  • 40
0
votes
0 answers

ValueError: TextPredictor should be a binary classifier for Precision Recall Curve

I'm trying to plot a precision recall curve for binary text classification using ktrain (wrapper for BERT) and getting the following error --------------------------------------------------------------------------- ValueError …
0
votes
1 answer

how to use cross-validation with ktrain?

I am using the ktrain package to perform multiclass text classification. The example on the official ktrain website works great (https://github.com/amaiya/ktrain) categories = ['alt.atheism', 'soc.religion.christian','comp.graphics', 'sci.med'] from…
ℕʘʘḆḽḘ
  • 18,566
  • 34
  • 128
  • 235
0
votes
2 answers

is there a method to load predictor from model file ktrain?

i saved my model like this : ktrain.get_predictor(learner.model,preproc=trans).save('model') i want to load my model and use it and to do something like : predictor = ktrain.load(folder) x = "hello wold" prediction = predictor(x) now, i have a…
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,…
0
votes
1 answer

Wrapper Ktrain for Text Classification Multiclass - Parallelize the fit with CPU

I'm trying to solve a multiclass classification problem with BERT by leveraging the Ktrain wrapper. Having a large amount of data, I wanted to know if it is possible to parallelize the learner.fit_onecycle (3e-4, 5) function or the autofit ()…
0
votes
0 answers

AttributeError: 'NoneType' object has no attribute 'thread' while importing ktrain

I am trying to do topic modeling, using ktrain. It gives me a weird error: AttributeError Traceback (most recent call last) in ----> 1 import…
Anakin Skywalker
  • 2,400
  • 5
  • 35
  • 63
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…
0
votes
1 answer

KeyError: 0 when using preprocess_test

preprocess_train ran successfully. Has anyone encountered similar KeyError when using preprocess_test / ktrain (0.18.5)? preprocessing test... language: en test sequence lengths: mean : 608 95percentile : 2102 99percentile :…
Wee Hyong
  • 3
  • 2
1
2