inference

tflite inference only predicts one label despite multiclass label training

tflite inference only predicts one label despite multiclass label training Question: I have trained a multiclass classifier for speech recognition using tensorflow. Then converted the model using tflite converter. The model can predict but it always outputs a single class. I suppose the problem is with the inference code because .h5 model can predict multiclass …

Total answers: 1

Transformers: How to use CUDA for inferencing?

Transformers: How to use CUDA for inferencing? Question: I have fine-tuned my models with GPU but inferencing process is very slow, I think this is because inferencing uses CPU by default. Here is my inferencing code: txt = "This was nice place" model = transformers.BertForSequenceClassification.from_pretrained(model_path, num_labels=24) tokenizer = transformers.BertTokenizer.from_pretrained(‘TurkuNLP/bert-base-finnish-cased-v1’) encoding = tokenizer.encode_plus(txt, add_special_tokens = True, …

Total answers: 2

How to get class and bounding box coordinates from YOLOv5 predictions?

How to get class and bounding box coordinates from YOLOv5 predictions? Question: I am trying to perform inference on my custom YOLOv5 model. The official documentation uses the default detect.py script for inference. I have written my own python script but I cannot access the predicted class and the bounding box coordinates from the output …

Total answers: 2