id stringlengths 7 11 | source stringclasses 1
value | category stringclasses 11
values | title stringlengths 15 214 | text stringlengths 70 30.5k | url stringlengths 57 160 | tags stringlengths 3 113 | created_at int64 1.22B 1.79B |
|---|---|---|---|---|---|---|---|
se_77190942 | stackoverflow | MACHINE_LEARNING | Why can we set LLM's input and output to be the same when fine tuning on text generation task? | Why can we set LLM's input and output to be the same when fine tuning on text generation task?
I'm trying to fine tune my GPT-2 model for song lyrics text generation, and I have a couple of song lyrics on hand. However, I'm confused about how to fine tune GPT-2 model that doesn't have standard input and outputs fo... | https://stackoverflow.com/questions/77190942/why-can-we-set-llms-input-and-output-to-be-the-same-when-fine-tuning-on-text-ge | machine-learning, nlp, large-language-model, fine-tuning, gpt-2 | 1,695,849,301 |
se_69526429 | stackoverflow | MACHINE_LEARNING | Why do we need 'value', 'key', and 'query' in attention layer? | Why do we need 'value', 'key', and 'query' in attention layer?
I am learning basic ideas about the 'Transformer' Model. Based on the paper and tutorial I saw, the 'Attention layer' uses the neural network to get the 'value', the 'key', and the 'query'.
Here is the attention layer I learned from... | https://stackoverflow.com/questions/69526429/why-do-we-need-value-key-and-query-in-attention-layer | machine-learning, deep-learning, transformer-model, attention-model, self-attention | 1,633,956,312 |
se_60776759 | stackoverflow | MACHINE_LEARNING | How to achieve regression model without underfitting or overfitting | How to achieve regression model without underfitting or overfitting
I have my university project and i'm given a dataset which almost all features have a very weak (only 1 feature has moderate correlation with the target) correlation with the target. It's distribution is not normal too. I already tried to apply simple... | https://stackoverflow.com/questions/60776759/how-to-achieve-regression-model-without-underfitting-or-overfitting | python, machine-learning, data-science | 1,584,716,941 |
se_79760189 | stackoverflow | MACHINE_LEARNING | Why isn't my keras model throwing and error when different sizes are passed to the dense layer? | Why isn't my keras model throwing and error when different sizes are passed to the dense layer?
I am working on a dynamic time series multi-class segmentation problem with keras (tensorflow version 2.12.0), and I wanted to see what would happen when I dropped in a dense layer into the network architecture. My expe... | https://stackoverflow.com/questions/79760189/why-isnt-my-keras-model-throwing-and-error-when-different-sizes-are-passed-to-t | python, tensorflow, machine-learning, keras, deep-learning | 1,757,443,996 |
se_79759129 | stackoverflow | MACHINE_LEARNING | CUDA error 700: an illegal memory access was encountered | CUDA error 700: an illegal memory access was encountered
I encounter error:
Application terminated with error: ??+0 (0x709D9F003D8A)
??+0 (0x709D9E884BA4)
??+0 (0x709D9E9F388C)
??+0 (0x709D9FF2FCF5)
??+0 (0x709D9FF31448)
??+0 (0x709D9EB84E21)
??+0 (0x709D9EB84C8A)
??+0 (0x709E0509CAA4)
??+0 (0x709E05129C3C)
(TCatBoos... | https://stackoverflow.com/questions/79759129/cuda-error-700-an-illegal-memory-access-was-encountered | python, machine-learning, regression, catboost | 1,757,348,061 |
se_53949880 | stackoverflow | MACHINE_LEARNING | Jointly training custom model with Tensorflow Object Detection API | Jointly training custom model with Tensorflow Object Detection API
I am trying to use Tensorflow object detection API models in another custom model I built (in the same codebase). Specifically, I am trying to figure out how below can be handled (mutually exclusive points):
jointly train Tensorflow object detection ... | https://stackoverflow.com/questions/53949880/jointly-training-custom-model-with-tensorflow-object-detection-api | python, tensorflow, machine-learning, deep-learning, computer-vision | 1,545,938,657 |
se_79367182 | stackoverflow | MACHINE_LEARNING | ImportError: cannot import name 'Tensor' from 'torch' (unknown location) | ImportError: cannot import name 'Tensor' from 'torch' (unknown location)
I’m trying to import Tensor from PyTorch:
from torch import Tensor
but I keep getting this error:
ImportError: cannot import name 'Tensor' from 'torch' (unknown location)
What I’ve Tried:
Checked that PyTorch is installed (pip ... | https://stackoverflow.com/questions/79367182/importerror-cannot-import-name-tensor-from-torch-unknown-location | python, machine-learning, pytorch | 1,737,205,475 |
se_40450366 | stackoverflow | MACHINE_LEARNING | Python OpenCV 3.1: KNN not working with the example in docs | Python OpenCV 3.1: KNN not working with the example in docs
I was trying to get the example on the docs page working.
cv2.KNearest() has been replaced with cv2.ml.KNearest_create().
However, the following code snippet still results in an error:
#!/usr/bin/python3
import cv2
import numpy as np
import matplotlib.pyplot ... | https://stackoverflow.com/questions/40450366/python-opencv-3-1-knn-not-working-with-the-example-in-docs | python, opencv, machine-learning, knn | 1,478,442,127 |
se_39410236 | stackoverflow | MACHINE_LEARNING | opencv 3.1 dnn (caffe) module model import fail | opencv 3.1 dnn (caffe) module model import fail
environment:
OS: win 10
IDE: Visual Studio 2013
opencv: 3.1 master from https://github.com/Itseez/opencv
opencv_contrib: from https://github.com/Itseez/opencv_contrib
graphic card: nvidia GeForce 610M
CUDA: tool kit v7.5 & cudnn is install
what I have done:
bu... | https://stackoverflow.com/questions/39410236/opencv-3-1-dnn-caffe-module-model-import-fail | opencv, machine-learning, neural-network, caffe, cudnn | 1,473,419,465 |
se_76900349 | stackoverflow | MACHINE_LEARNING | Repo id error when using hugging face transformers | Repo id error when using hugging face transformers
I keep getting this error when I try to use hugging face transformers library.
huggingface_hub.utils._validators.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': 'C:/Users/FZH91R/PycharmProjects/DudeWheresMyHealing/Pytorch/tf_model.... | https://stackoverflow.com/questions/76900349/repo-id-error-when-using-hugging-face-transformers | python, machine-learning, pytorch, huggingface-transformers, huggingface-tokenizers | 1,692,027,634 |
se_75899314 | stackoverflow | MACHINE_LEARNING | How can I serve ML models quickly and with a low latency | How can I serve ML models quickly and with a low latency
Assume a user connects via a Websocket connection to a server, which serves a personalized typescript function based on a personalized JSON file
So when a user connects,
the personalized JSON file is loaded from an S3-lile bucket (around 60-100 MB per user)
and... | https://stackoverflow.com/questions/75899314/how-can-i-serve-ml-models-quickly-and-with-a-low-latency | python, machine-learning, cdn, scalability, low-latency | 1,680,270,638 |
se_79756853 | stackoverflow | MACHINE_LEARNING | Why is my plot of the cost function like this and not like a bowl? | Why is my plot of the cost function like this and not like a bowl?
My code:
def calc_cost_function(w, b, data):
m = len(data)
cost = 0
for i in range(m):
x = data.iloc[i].X
y = data.iloc[i].Y
cost += ((x * w + b) - y)**2
return cost / (2 * m)
def gradient_descent(w_current, b_... | https://stackoverflow.com/questions/79756853/why-is-my-plot-of-the-cost-function-like-this-and-not-like-a-bowl | machine-learning, math, plot, artificial-intelligence, linear-regression | 1,757,080,130 |
se_62219577 | stackoverflow | MACHINE_LEARNING | How to deal with missing values in K-means clustering? | How to deal with missing values in K-means clustering?
I am working on customer segmentation based on their purchases for different type of product category.
Below is a dummy representation of my data. (The data is in percentage of the total revenue per each category the customer purchased):
As seen in the image link... | https://stackoverflow.com/questions/62219577/how-to-deal-with-missing-values-in-k-means-clustering | machine-learning, cluster-analysis, k-means | 1,591,373,043 |
se_69134882 | stackoverflow | MACHINE_LEARNING | K-Arms Bandit Epsilon-Greedy Policy | K-Arms Bandit Epsilon-Greedy Policy
I have been trying to implement Reinforcement Learning books exercise 2.5
I have written this piece of code according to this pseudo version
class k_arm:
def __init__(self, iter, method="incrementally"):
# self.iter placeholder
self.iter = iter
self.k =... | https://stackoverflow.com/questions/69134882/k-arms-bandit-epsilon-greedy-policy | python, machine-learning, reinforcement-learning | 1,631,289,195 |
se_44483233 | stackoverflow | MACHINE_LEARNING | Is using batch size as 'powers of 2' faster on tensorflow? | Is using batch size as 'powers of 2' faster on tensorflow?
I read from somewhere that if you choose a batch size that is a power 2, training will be faster. What is this rule? Is this applicable to other applications? Can you provide a reference paper? | https://stackoverflow.com/questions/44483233/is-using-batch-size-as-powers-of-2-faster-on-tensorflow | tensorflow, machine-learning, deep-learning, batchsize | 1,497,179,856 |
se_79751915 | stackoverflow | MACHINE_LEARNING | PyTorch XPU training loop memory leak despite explicit cleanup (gc.collect, torch.xpu.empty_cache) | PyTorch XPU training loop memory leak despite explicit cleanup (gc.collect, torch.xpu.empty_cache)
I’m training a RVC which use HIFI-GAN-style speech model on Intel XPU (PyTorch 2.3, oneAPI backend). During training, my GPU/XPU memory usage keeps growing with each batch until OOM, even though I explicitly delete tenso... | https://stackoverflow.com/questions/79751915/pytorch-xpu-training-loop-memory-leak-despite-explicit-cleanup-gc-collect-torc | machine-learning, deep-learning, pytorch | 1,756,660,623 |
se_79750977 | stackoverflow | MACHINE_LEARNING | Flask ML App Stuck on "Loading" Status Despite Successful Model Training | Flask ML App Stuck on "Loading" Status Despite Successful Model Training
I'm deploying a Flask ML application with book recommendations to Render, but I'm experiencing a persistent issue where my health endpoint always returns "model_loaded": false, "status": "loading", even though the logs clearly show that... | https://stackoverflow.com/questions/79750977/flask-ml-app-stuck-on-loading-status-despite-successful-model-training | python, machine-learning, flask, scikit-learn, gunicorn | 1,756,536,645 |
se_3068658 | stackoverflow | MACHINE_LEARNING | What techniques exist for the software-driven locomotion of a bipedal robot? | What techniques exist for the software-driven locomotion of a bipedal robot?
I'm programming a software agent to control a robot player in a simulated game of soccer. Ultimately I hope to enter it in the RoboCup competition.
Amongst the various challenges involved in creating such an agent, the motion of it's body i... | https://stackoverflow.com/questions/3068658/what-techniques-exist-for-the-software-driven-locomotion-of-a-bipedal-robot | language-agnostic, machine-learning, robotics, robocup | 1,276,854,894 |
se_72935959 | stackoverflow | MACHINE_LEARNING | Prediction on new data after pickling on regression model | Prediction on new data after pickling on regression model
I have created ridge regression model to predict sales of an item say X. My final model contains around 180 features. I have pickled this model and now I want to see how model I created is performing on new data set containing same features as present in differ... | https://stackoverflow.com/questions/72935959/prediction-on-new-data-after-pickling-on-regression-model | python, machine-learning, data-science, linear-regression | 1,657,529,786 |
se_2255833 | stackoverflow | MACHINE_LEARNING | How to approach machine learning problems with high dimensional input space? | How to approach machine learning problems with high dimensional input space?
How should I approach a situtation when I try to apply some ML algorithm (classification, to be more specific, SVM in particular) over some high dimensional input, and the results I get are not quite satisfactory?
1, 2 or 3 dimensional data ... | https://stackoverflow.com/questions/2255833/how-to-approach-machine-learning-problems-with-high-dimensional-input-space | machine-learning, classification, svm | 1,266,018,178 |
se_76196650 | stackoverflow | MACHINE_LEARNING | How do I write a python code for Linear regression with omitted variables? | How do I write a python code for Linear regression with omitted variables?
Generate random data for a linear regression with omitted variables and make two independent variables that are correlated with each other and make one dependent variable that is correlated with both independent variables.
Is this correct appro... | https://stackoverflow.com/questions/76196650/how-do-i-write-a-python-code-for-linear-regression-with-omitted-variables | python, machine-learning, data-science, linear-regression, correlation | 1,683,501,207 |
se_42689345 | stackoverflow | MACHINE_LEARNING | Subset of Imagenet Dataset for image classification | Subset of Imagenet Dataset for image classification
I need an annotated dataset, subset of Imagenet, that includes square images of size: 224x224.
I tried Tiny Imagenet and Cifar-10, but they consist of quite smaller images and don't fit my needs.
Is there anything similar available? I cannot use the entire Imagenet... | https://stackoverflow.com/questions/42689345/subset-of-imagenet-dataset-for-image-classification | image, machine-learning, dataset, deep-learning, conv-neural-network | 1,489,045,023 |
se_69742675 | stackoverflow | MACHINE_LEARNING | XGBoost Bad Allocation | XGBoost Bad Allocation
When loading an XGBoost model and running it I get the following error:
XGBoostError: bad allocation
I read it might be a memory problem, I have 32Gb of RAM and the model is quite small. I only have 8Gb of memory on my C: drive which might be causing the problem?
Code below:
def workflow_funnel... | https://stackoverflow.com/questions/69742675/xgboost-bad-allocation | python, machine-learning, xgboost | 1,635,353,783 |
se_44172162 | stackoverflow | MACHINE_LEARNING | F1 Score vs ROC AUC | F1 Score vs ROC AUC
I have the below F1 and AUC scores for 2 different cases
Model 1: Precision: 85.11 Recall: 99.04 F1: 91.55 AUC: 69.94
Model 2: Precision: 85.1 Recall: 98.73 F1: 91.41 AUC: 71.69
The main motive of my problem to predict the positive cases correctly,ie, reduce the False Negative cases (FN)... | https://stackoverflow.com/questions/44172162/f1-score-vs-roc-auc | machine-learning, auc, precision-recall | 1,495,685,669 |
se_56818719 | stackoverflow | MACHINE_LEARNING | Getting error to fit a Conv1d to classify diabetic patients using the Pima Indian diabetes data set using keras in R | Getting error to fit a Conv1d to classify diabetic patients using the Pima Indian diabetes data set using keras in R
I am new to the machine learning field. I was using keras package in R to classify the diabetic individuals, using the Pima Indian diabetes dataset and fitting a Conv1d. I am not sure where I am doing t... | https://stackoverflow.com/questions/56818719/getting-error-to-fit-a-conv1d-to-classify-diabetic-patients-using-the-pima-india | r, machine-learning, deep-learning | 1,561,821,948 |
se_67805826 | stackoverflow | MACHINE_LEARNING | Linear Regression Coefficients | Linear Regression Coefficients
I am currently using statsmodels (although I would also be happy to use Scikit) to create a linear regression. On this particular model I am finding that when adding more than one factor to the model, the OLS algorithm spits out wild coefficients. These coefficients are both extremely hi... | https://stackoverflow.com/questions/67805826/linear-regression-coefficients | python, machine-learning, scikit-learn, linear-regression, statsmodels | 1,622,639,607 |
se_79714027 | stackoverflow | MACHINE_LEARNING | Hugging Face sentence-transformers model not loading | Hugging Face sentence-transformers model not loading
I'm trying to load in a huggingface sentence transformers model like this:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("all-MiniLM-L6-v2") ##I've also tried "sentence-transformers/all-MiniLM-L6-v2"
However, I'm getting this err... | https://stackoverflow.com/questions/79714027/hugging-face-sentence-transformers-model-not-loading | machine-learning, huggingface-transformers, sentence-transformers | 1,753,396,679 |
se_79744303 | stackoverflow | MACHINE_LEARNING | How to load dataset from huggingface to google colab? | How to load dataset from huggingface to google colab?
I am trying to load a training dataset in my Google Colab notebook but keep getting an error.
Here is the code snippet which returns the error:
from datasets import load_dataset
ds = load_dataset("valiantlynxz/godseye-violence-detection-dataset",download_mode="for... | https://stackoverflow.com/questions/79744303/how-to-load-dataset-from-huggingface-to-google-colab | python, machine-learning, dataset, google-colaboratory, huggingface | 1,755,958,046 |
se_69780732 | stackoverflow | MACHINE_LEARNING | Getting errors with mediapipe for making Hand Tracking Module in Python 3.7.9 | Getting errors with mediapipe for making Hand Tracking Module in Python 3.7.9
I am getting the following error whenever I try to run my code, I am following a tutorial for hand tracking, I followed the steps correctly but I still to have some sort of error.
Link to Video: https://www.youtube.com/watch?v=01sAkU_NvOY&t=... | https://stackoverflow.com/questions/69780732/getting-errors-with-mediapipe-for-making-hand-tracking-module-in-python-3-7-9 | python, machine-learning, mediapipe | 1,635,616,255 |
se_43399268 | stackoverflow | MACHINE_LEARNING | Multi-Layer Perceptrons in EmguCV | Multi-Layer Perceptrons in EmguCV
I'm trying to implement Multi-Layer Perceptrons (MLP) neural networks using EmguCV 3.1 (a dot NET wrapper for OpenCV library) in C#(Windows Form). In order to practice with this library I decide to implement OR operation using MLP.
I create MLP using "Initialize" method and learn it... | https://stackoverflow.com/questions/43399268/multi-layer-perceptrons-in-emgucv | c#, opencv, machine-learning, neural-network, emgucv | 1,492,107,912 |
se_79743002 | stackoverflow | MACHINE_LEARNING | How do I create a Pytorch Dataset from multiple files where each file has multiple batches | How do I create a Pytorch Dataset from multiple files where each file has multiple batches
How do I create an dataset that reads in data from multiple files, but where each file has lots of rows or batches.
For example, I have a partitioned parquet dataset (created with pandas.to_parquet), with text or embeddings in e... | https://stackoverflow.com/questions/79743002/how-do-i-create-a-pytorch-dataset-from-multiple-files-where-each-file-has-multip | python, machine-learning, pytorch, nlp | 1,755,840,923 |
se_79741908 | stackoverflow | MACHINE_LEARNING | Calculating the partial derivative of PyTorch model output with respect to neurons pre-activation | Calculating the partial derivative of PyTorch model output with respect to neurons pre-activation
I am working on neuron importance for ANNs (in a classification setting). A simple baseline is the partial derivative of the model output for the correct class with respect to the given neuron pre-activation. My goal is t... | https://stackoverflow.com/questions/79741908/calculating-the-partial-derivative-of-pytorch-model-output-with-respect-to-neuro | python, machine-learning, deep-learning, pytorch | 1,755,757,301 |
se_78852192 | stackoverflow | MACHINE_LEARNING | Choose available GPU devices with device_map | Choose available GPU devices with device_map
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="cuda:3",
)
There are many GPUs on the server, but I can only use two of them. How should I configure de... | https://stackoverflow.com/questions/78852192/choose-available-gpu-devices-with-device-map | python, machine-learning, huggingface-transformers, transformer-model | 1,723,197,874 |
se_51433378 | stackoverflow | MACHINE_LEARNING | What does model.train() do in PyTorch? | What does model.train() do in PyTorch?
Does it call forward() in nn.Module? I thought when we call the model, forward method is being used.
Why do we need to specify train()? | https://stackoverflow.com/questions/51433378/what-does-model-train-do-in-pytorch | python, machine-learning, deep-learning, pytorch | 1,532,045,400 |
se_79218976 | stackoverflow | MACHINE_LEARNING | How to use kmeans in python with Pearson correlation as distance measure, similar to MATLAB? | How to use kmeans in python with Pearson correlation as distance measure, similar to MATLAB?
In MATLAB there is kmeans function with parameter as 'correlation' and 'distance'. I want similar functionality in python. How do I do that? Are there any in-built functions which does this? Or are there any custom built solut... | https://stackoverflow.com/questions/79218976/how-to-use-kmeans-in-python-with-pearson-correlation-as-distance-measure-simila | python, matlab, machine-learning, artificial-intelligence | 1,732,401,440 |
se_57210270 | stackoverflow | MACHINE_LEARNING | Predictions made by neural network are incorrect | Predictions made by neural network are incorrect
I am trying to build a neural network from scratch to do image recognition on the MNIST database but the code not only produces incorrect answer it seems way off .
I have tried to look at weights and biases in intermediate step but since there is no way to know what wei... | https://stackoverflow.com/questions/57210270/predictions-made-by-neural-network-are-incorrect | python, machine-learning, neural-network | 1,564,089,610 |
se_51988030 | stackoverflow | MACHINE_LEARNING | sklearn StandardScaler, doesn't allow direct transform, we need to fit_transform | sklearn StandardScaler, doesn't allow direct transform, we need to fit_transform
What is the difference between fit_transform and transform?
Why doesn't transform directly works?
from sklearn.preprocessing import StandardScaler
X_scaler = StandardScaler()
X_train = X_scaler.fit_transform(X_train)
X_test = X_s... | https://stackoverflow.com/questions/51988030/sklearn-standardscaler-doesnt-allow-direct-transform-we-need-to-fit-transform | python-3.x, machine-learning, scikit-learn, data-science | 1,535,034,049 |
se_46728937 | stackoverflow | MACHINE_LEARNING | Retrieve final hidden activation layer output from sklearn's MLPClassifier | Retrieve final hidden activation layer output from sklearn's MLPClassifier
I would like to do some tests with neural network final hidden activation layer outputs using sklearn's MLPClassifier after fitting the data.
for example, If I create a classifier, assuming data X_train with labels y_train and two hidden l... | https://stackoverflow.com/questions/46728937/retrieve-final-hidden-activation-layer-output-from-sklearns-mlpclassifier | python, machine-learning, scikit-learn, classification, data-science | 1,507,894,282 |
se_79733937 | stackoverflow | MACHINE_LEARNING | ValueError when fitting model: Expected 2D array, got 1D array instead | ValueError when fitting model: Expected 2D array, got 1D array instead
import numpy as np
from sklearn.linear_model import LinearRegression
X = np.array([1, 2, 3, 4, 5]) # Features
y = np.array([2, 4, 6, 8, 10]) # Target
model = LinearRegression()
model.fit(X, y) # <-- Error occurs here
When I try to fit my Linea... | https://stackoverflow.com/questions/79733937/valueerror-when-fitting-model-expected-2d-array-got-1d-array-instead | numpy, machine-learning, scikit-learn | 1,755,065,781 |
se_71789376 | stackoverflow | MACHINE_LEARNING | How to convert yolo annotations to coco format. Json? | How to convert yolo annotations to coco format. Json?
I want to convert my labels in yolo format to coco format
I have tried
https://github.com/Taeyoung96/Yolo-to-COCO-format-converter
And
Pylabel
They all have a bugs.
I want to train on detectron 2 but it fails to load the dataset because of the wrong json file. | https://stackoverflow.com/questions/71789376/how-to-convert-yolo-annotations-to-coco-format-json | machine-learning, deep-learning, object-detection, data-annotations, annotation-processing | 1,649,368,498 |
se_75976333 | stackoverflow | MACHINE_LEARNING | Neural Net: Loss decreasing, but accuracy stays exactly the same | Neural Net: Loss decreasing, but accuracy stays exactly the same
I am new to PyTorch and just tried to build my first Neural Network on the MNIST dataset. In particular, I wanted to followed this tutorial: https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html
My training code looks like this:
for epoch in... | https://stackoverflow.com/questions/75976333/neural-net-loss-decreasing-but-accuracy-stays-exactly-the-same | python, machine-learning, pytorch | 1,681,122,956 |
se_76310061 | stackoverflow | MACHINE_LEARNING | Increasing The Amount Of Neurons In Hidden Layer | Increasing The Amount Of Neurons In Hidden Layer
I am working to understand how to build my own ANN from scratch.
I have looked around and found a simple two layer architecture and the init_parameters function is like this.
def init_parameters():
W1 = np.random.normal(size=(10, 784)) * np.sqrt(1./(784))
b1 = n... | https://stackoverflow.com/questions/76310061/increasing-the-amount-of-neurons-in-hidden-layer | python, python-3.x, machine-learning, neural-network | 1,684,791,505 |
se_79736455 | stackoverflow | MACHINE_LEARNING | Replacing WideResNet50 with EfficientNetV2-M in GLASS defect detection model causes Module layer2 not found in the model | Replacing WideResNet50 with EfficientNetV2-M in GLASS defect detection model causes Module layer2 not found in the model
I’m using the GLASS defect detection model and want to replace its default wideresnet50 backbone with efficientnetv2_m in shell/run-custom.sh.However, when I run
bash run-custom.sh
I get the follow... | https://stackoverflow.com/questions/79736455/replacing-wideresnet50-with-efficientnetv2-m-in-glass-defect-detection-model-cau | machine-learning, deep-learning, pytorch, computer-vision, artificial-intelligence | 1,755,263,394 |
se_63215140 | stackoverflow | MACHINE_LEARNING | PyTorch Linear MNIST model training error | PyTorch Linear MNIST model training error
I am creating a binary classifier based on the MNIST dataset using PyTorch. I want my classifier to classify between only 0s and 1s, however, when I train it, the error doesn't decrease and the loss becomes negative.
Here's the error and loss at the first few iterations:
Tr... | https://stackoverflow.com/questions/63215140/pytorch-linear-mnist-model-training-error | python, machine-learning, pytorch, mnist | 1,596,365,637 |
se_79736231 | stackoverflow | MACHINE_LEARNING | How do I format my a tensorflow dataset for a multi output model? | How do I format my a tensorflow dataset for a multi output model?
I have an image dataset where each image has multiple categorical features that I want to predict. I am getting this error when trying to train:
ValueError: y_true and y_pred have different structures.
y_true: *
y_pred: ['*', '*', '*', '*']
Here's is m... | https://stackoverflow.com/questions/79736231/how-do-i-format-my-a-tensorflow-dataset-for-a-multi-output-model | python, tensorflow, machine-learning, keras, deep-learning | 1,755,246,327 |
se_55447901 | stackoverflow | MACHINE_LEARNING | ValueError: Error when checking target: expected dense_8 to have 4 dimensions, but got array with shape (37800, 10, 10) | ValueError: Error when checking target: expected dense_8 to have 4 dimensions, but got array with shape (37800, 10, 10)
I'm a beginner at machine learning. I am working on mnist dataset which I downloaded from kaggle. I am making this very first project by the help of a tutorial. But I'm facing this issue which I am u... | https://stackoverflow.com/questions/55447901/valueerror-error-when-checking-target-expected-dense-8-to-have-4-dimensions-b | machine-learning, deep-learning, mnist | 1,554,090,756 |
se_79653092 | stackoverflow | MACHINE_LEARNING | CNN Constant Predictions | CNN Constant Predictions
I’m building a Keras model based on MobileNetV2 for frame-level prediction of 6 human competencies. Each output head represents a competency and is a softmax over 100 classes (scores 0–99). The model takes in 224x224 RGB frames, normalized to [-1, 1] (compatible with MobileNetV2 preprocessing)... | https://stackoverflow.com/questions/79653092/cnn-constant-predictions | python, tensorflow, machine-learning, deep-learning, conv-neural-network | 1,749,051,612 |
se_49967526 | stackoverflow | MACHINE_LEARNING | Neural Network with Input - Relu - SoftMax - Cross Entropy Weights and Activations grow unbounded | Neural Network with Input - Relu - SoftMax - Cross Entropy Weights and Activations grow unbounded
I have implemented a neural network with 3 layers Input to Hidden Layer with 30 neurons(ReLU Activation) to Softmax Output layer. I am using the cross entropy cost function. No outside libraries are being used. This is wo... | https://stackoverflow.com/questions/49967526/neural-network-with-input-relu-softmax-cross-entropy-weights-and-activatio | machine-learning, neural-network, activation-function | 1,524,410,327 |
se_71261347 | stackoverflow | MACHINE_LEARNING | RuntimeError: DataLoader worker exited unexpectedly | RuntimeError: DataLoader worker exited unexpectedly
I am new to PyTorch and Machine Learning so I try to follow the tutorial from here:
https://medium.com/@nutanbhogendrasharma/pytorch-convolutional-neural-network-with-mnist-dataset-4e8a4265e118
By copying the code step by step I got the following error for no reason.... | https://stackoverflow.com/questions/71261347/runtimeerror-dataloader-worker-exited-unexpectedly | python, machine-learning, pytorch | 1,645,766,124 |
se_55740220 | stackoverflow | MACHINE_LEARNING | Macro VS Micro VS Weighted VS Samples F1 Score | Macro VS Micro VS Weighted VS Samples F1 Score
In sklearn.metrics.f1_score, the f1 score has a parameter called "average". What does macro, micro, weighted, and samples mean? Please elaborate, because in the documentation, it was not explained properly. Or simply answer the following:
Why is "samples" best parameter... | https://stackoverflow.com/questions/55740220/macro-vs-micro-vs-weighted-vs-samples-f1-score | python, python-3.x, machine-learning, scikit-learn, metrics | 1,555,568,785 |
se_79727860 | stackoverflow | MACHINE_LEARNING | how to solve ValueError: Failed to construct dataset "imdb_reviews"? | how to solve ValueError: Failed to construct dataset "imdb_reviews"?
ValueError: Failed to construct dataset "imdb_reviews",
builder_kwargs "{'config': 'subwords8k', 'data_dir': None}":
BuilderConfig subwords8k not found with version None.
Here are 10 BuilderConfigs whose name closely match:
I've got thi... | https://stackoverflow.com/questions/79727860/how-to-solve-valueerror-failed-to-construct-dataset-imdb-reviews | python, tensorflow, machine-learning, nlp, artificial-intelligence | 1,754,514,942 |
se_27822752 | stackoverflow | MACHINE_LEARNING | scikit-learn: Predicting new points with DBSCAN | scikit-learn: Predicting new points with DBSCAN
I am using DBSCAN to cluster some data using Scikit-Learn (Python 2.7):
from sklearn.cluster import DBSCAN
dbscan = DBSCAN(random_state=0)
dbscan.fit(X)
However, I found that there was no built-in function (aside from "fit_predict") that could assign the new data points... | https://stackoverflow.com/questions/27822752/scikit-learn-predicting-new-points-with-dbscan | machine-learning, scikit-learn, cluster-analysis, data-mining, dbscan | 1,420,644,479 |
se_49541671 | stackoverflow | MACHINE_LEARNING | How to save learned weights/parameters of PCA and T-SNE in Sklearn | How to save learned weights/parameters of PCA and T-SNE in Sklearn
I have two set of data let's say A and B.
I want to apply PCA and T-sne to A and fine tune the algo.
Once, I am satisfied with my tuning I want to save the learnt things to some pickle file.
Now I want to apply the same learnt PCA and t-sne to set B.
I... | https://stackoverflow.com/questions/49541671/how-to-save-learned-weights-parameters-of-pca-and-t-sne-in-sklearn | python, machine-learning, scikit-learn | 1,522,261,682 |
se_46299246 | stackoverflow | MACHINE_LEARNING | Sound digit classification | Sound digit classification
What I'm trying to do is conceptually similar to the famous MNIST classification example. Except that each digit is a computer generated sound wave.
I'll be adding some background noise to the data in order to improve real world accuracy.
My question is; considering the sequential data what ... | https://stackoverflow.com/questions/46299246/sound-digit-classification | python-3.x, machine-learning, scikit-learn, sound-recognition | 1,505,820,452 |
se_48673104 | stackoverflow | MACHINE_LEARNING | How to detect rotated object from image using OpenCV? | How to detect rotated object from image using OpenCV?
I have been training OpenCV classifier for recognition of books.The requirement is recognize book from an image. I have used 1000+ images and OpenCV is able to detect books with no rotation. However, when I try to detect books with rotations it does not work proper... | https://stackoverflow.com/questions/48673104/how-to-detect-rotated-object-from-image-using-opencv | opencv, machine-learning, computer-vision, object-detection | 1,518,037,061 |
se_34572657 | stackoverflow | MACHINE_LEARNING | How do I train an MLP model with my own data instead of MNIST dataset | How do I train an MLP model with my own data instead of MNIST dataset
I'm trying to build an MLP model using pylearn2. But the manual isn't that explicit on how to import external data (all tutorials use the MNIST dataset).
So, my data are CSV files:
0 0.129 -0.234 0.394 ...
0 0.293 -0.394 0.234 ...
1 0.192 -0.842 0... | https://stackoverflow.com/questions/34572657/how-do-i-train-an-mlp-model-with-my-own-data-instead-of-mnist-dataset | python, machine-learning, neural-network, regression, pylearn | 1,451,786,712 |
se_66750391 | stackoverflow | MACHINE_LEARNING | RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces) | RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces)
I am using Pytorch. I got this RuntimeError while evaluating a model. Any idea how to solve this? | https://stackoverflow.com/questions/66750391/runtimeerror-view-size-is-not-compatible-with-input-tensors-size-and-stride-a | python, machine-learning, deep-learning, pytorch, computer-vision | 1,616,431,812 |
se_62986313 | stackoverflow | MACHINE_LEARNING | keras 2.4. producing completely different output than 2.3.1 | keras 2.4. producing completely different output than 2.3.1
I am trying to implement autoencoders. Using MNIST dataset, I am first encoding the images and then decoding them. When I use keras version 2.3.1 I am getting decoded Images very close to original but on using Keras 2.4.3 and no change to code I am getting co... | https://stackoverflow.com/questions/62986313/keras-2-4-producing-completely-different-output-than-2-3-1 | python, tensorflow, machine-learning, keras, deep-learning | 1,595,197,223 |
se_33623144 | stackoverflow | MACHINE_LEARNING | how can I make recommendation model using python's scikit-learn | how can I make recommendation model using python's scikit-learn
I'm learning statistical learning these days using python's pandas and scikit-learn library and they're fantastic tools for me.
I could have learned the way of classification, regression and also clustering with them of course.
But, I cannot find th... | https://stackoverflow.com/questions/33623144/how-can-i-make-recommendation-model-using-pythons-scikit-learn | python, machine-learning, scikit-learn, recommendation-engine, collaborative-filtering | 1,447,131,306 |
se_79725054 | stackoverflow | MACHINE_LEARNING | RuntimeError in torch.cat during VACE-Wan2.1 inference: mask and video tensor shape mismatch | RuntimeError in torch.cat during VACE-Wan2.1 inference: mask and video tensor shape mismatch
I'm using the Wan2.1-VACE video generation model, and during inference I encountered a RuntimeError related to mismatched tensor shapes in a torch.cat operation inside the vace_latent() function.
From the debug output:
src_vid... | https://stackoverflow.com/questions/79725054/runtimeerror-in-torch-cat-during-vace-wan2-1-inference-mask-and-video-tensor-sh | python, machine-learning, deep-learning, pytorch, computer-vision | 1,754,318,209 |
se_79260781 | stackoverflow | MACHINE_LEARNING | What is the Keras 3 version of this numpy function of this IEEE754 to Unsigned Integer 8 normalization? | What is the Keras 3 version of this numpy function of this IEEE754 to Unsigned Integer 8 normalization?
Using the Keras 3 ops api, what is the Keras 3 version of this normalization function?
def ieee754_to_uint8(x, axis=-1):
"""
Normalize a tensor using IEEE 754 logic and map it to uint8 values.
Args:
x (... | https://stackoverflow.com/questions/79260781/what-is-the-keras-3-version-of-this-numpy-function-of-this-ieee754-to-unsigned-i | python, machine-learning, keras, neural-network | 1,733,581,973 |
se_78820971 | stackoverflow | MACHINE_LEARNING | Pyannote: Load and Apply Speaker Diarization Offline | Pyannote: Load and Apply Speaker Diarization Offline
I try to use Pyannotes models offline.
I was loading and applying models like this:
from pyannote.audio import Pipeline
access_token = 'xxxxxxxxxxx'
model = Pipeline.from_pretrained(
"pyannote/speaker-diarization-3.1",
use_auth_token=access_token... | https://stackoverflow.com/questions/78820971/pyannote-load-and-apply-speaker-diarization-offline | machine-learning, audio, speaker-diarization | 1,722,515,321 |
se_66863490 | stackoverflow | MACHINE_LEARNING | Shap force plot not displaying figure: shap.plots._force.AdditiveForceVisualizer | Shap force plot not displaying figure: shap.plots._force.AdditiveForceVisualizer
I am going through https://towardsdatascience.com/explain-your-model-with-the-shap-values-bc36aac4de3d trying to get the force_plot to print.
I'm running Python 3.8.5 on Ubuntu 20.04
I run this code:
shap.initjs()
# Write in a function
... | https://stackoverflow.com/questions/66863490/shap-force-plot-not-displaying-figure-shap-plots-force-additiveforcevisualizer | python-3.x, machine-learning, shap | 1,617,065,951 |
se_55072299 | stackoverflow | MACHINE_LEARNING | Neural network weights too large? | Neural network weights too large?
I'm implementing a neural network with backward propagation. The weights are initialized to (-0.5, 0.5). However, after the first time the inputs are sent forward and errors and propagated back, the weights are increased to be around 1000, sometimes even 2000. (between the input layer... | https://stackoverflow.com/questions/55072299/neural-network-weights-too-large | tensorflow, machine-learning, neural-network | 1,552,086,877 |
se_74163700 | stackoverflow | MACHINE_LEARNING | K-Means Clustering Output seems wrong, how can it be explained? | K-Means Clustering Output seems wrong, how can it be explained?
I have a custom dataset that I want to partion using kmeans. This is my MCVE:
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
samples = np.array([[3.2736001e+03, 1.7453293e+00], [3.7256001e+03, 5.2359879e-02], [3.2960000e+03, 1.7366025e... | https://stackoverflow.com/questions/74163700/k-means-clustering-output-seems-wrong-how-can-it-be-explained | python, machine-learning, scikit-learn, k-means | 1,666,442,828 |
se_79727624 | stackoverflow | MACHINE_LEARNING | TensorFlow hangs indefinitely on model.fit() even with synthetic data | TensorFlow hangs indefinitely on model.fit() even with synthetic data
I have my dataset with images to classify, using an ML model in TensorFlow. When I train the model for a number of epochs, TensorFlow automatically prints out which epoch we are on. Mine is always stuck on 1/n. None of the batches are ever processed... | https://stackoverflow.com/questions/79727624/tensorflow-hangs-indefinitely-on-model-fit-even-with-synthetic-data | python, tensorflow, machine-learning | 1,754,500,172 |
se_59480642 | stackoverflow | MACHINE_LEARNING | Why is every prediction for my MNIST digit project wrong? | Why is every prediction for my MNIST digit project wrong?
I have done this basic project with Anaconda notebook. Everything runs fine, but every prediction with my own digit picture is wrong. I am using the MNIST Set for digital numbers and I am trying to paint my own digit with black background and white painting. B... | https://stackoverflow.com/questions/59480642/why-is-every-prediction-for-my-mnist-digit-project-wrong | python, tensorflow, machine-learning, neural-network, mnist | 1,577,295,656 |
se_78419755 | stackoverflow | MACHINE_LEARNING | TensorFlow.keras namespace not recognized by PyLance in Visual Studio Code | TensorFlow.keras namespace not recognized by PyLance in Visual Studio Code
I'm encountering an issue with PyLance in Visual Studio Code where the tensorflow.keras namespace isn't being recognized, leading to incomplete IntelliSense and auto-completion. It appears that this problem stems from the lazy loading functiona... | https://stackoverflow.com/questions/78419755/tensorflow-keras-namespace-not-recognized-by-pylance-in-visual-studio-code | python, tensorflow, visual-studio-code, machine-learning, intellisense | 1,714,659,118 |
se_51693501 | stackoverflow | MACHINE_LEARNING | KNN classifier taking too much time even on GPU | KNN classifier taking too much time even on GPU
I am classifying the MNIST digit using KNN on kaggle but at last step it is taking to much time to execute and MNIST data is juts 15 mb like i am still waiting can you point any problem that is in my code thanks.
import numpy as np # linear algebra
import pandas as pd # ... | https://stackoverflow.com/questions/51693501/knn-classifier-taking-too-much-time-even-on-gpu | machine-learning, knn | 1,533,465,140 |
se_49702795 | stackoverflow | MACHINE_LEARNING | Augment MNIST dataset tensorflow | Augment MNIST dataset tensorflow
I am trying to augment the MNIST dataset. This is what I tried. Can't get any success.
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
X = mnist.train.images
y = mnist.train.labels
def flip_images(X_imgs):
X_flip = []
tf.reset_default_graph(... | https://stackoverflow.com/questions/49702795/augment-mnist-dataset-tensorflow | python, tensorflow, machine-learning, computer-vision, mnist | 1,523,062,725 |
se_79669083 | stackoverflow | MACHINE_LEARNING | Time series patient visits for XGBoost classifier | Time series patient visits for XGBoost classifier
I’m developing a tree-based model classifier (XGBoost) using some healthcare (patient visits) data. The data has a time dimension, and I want to observe if there is a longitudinal effect for the prediction of the target feature. To predict the target for the current vi... | https://stackoverflow.com/questions/79669083/time-series-patient-visits-for-xgboost-classifier | machine-learning, time-series, classification, xgboost | 1,750,163,986 |
se_36631163 | stackoverflow | MACHINE_LEARNING | What are the pros and cons between get_dummies (Pandas) and OneHotEncoder (Scikit-learn)? | What are the pros and cons between get_dummies (Pandas) and OneHotEncoder (Scikit-learn)?
I'm learning different methods to convert categorical variables to numeric for machine-learning classifiers. I came across the pd.get_dummies method and sklearn.preprocessing.OneHotEncoder() and I wanted to see how they differed... | https://stackoverflow.com/questions/36631163/what-are-the-pros-and-cons-between-get-dummies-pandas-and-onehotencoder-sciki | python, pandas, machine-learning, scikit-learn, dummy-variable | 1,460,658,517 |
se_78725972 | stackoverflow | MACHINE_LEARNING | What parameter do I need to change for it to match requirements? | What parameter do I need to change for it to match requirements?
I am trying to train a model based on a modified MNIST dataset so it classifies random images with label 10. I am constantly getting a TypeError.
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,))
]... | https://stackoverflow.com/questions/78725972/what-parameter-do-i-need-to-change-for-it-to-match-requirements | machine-learning, pytorch, mnist, pytorch-dataloader | 1,720,532,622 |
se_79722074 | stackoverflow | MACHINE_LEARNING | MNIST multi digit prediction | MNIST multi digit prediction
I tried to train a model on mnist dataset. It's working fine for single digit prediction and I got 96.92% accuracy on test data too but I have everything but it's not working for multidigit.
even though I took an image with spacing in between and it was able to split and preprocess it prop... | https://stackoverflow.com/questions/79722074/mnist-multi-digit-prediction | python, machine-learning, deep-learning, mnist | 1,754,024,484 |
se_77058057 | stackoverflow | MACHINE_LEARNING | I get multi-class error when trying to use roc_auc_score from scikit-learn even though both arrays are 1D | I get multi-class error when trying to use roc_auc_score from scikit-learn even though both arrays are 1D
Even if I put the multi class argument, the next error is about the dimension:
numpy.exceptions.AxisError: axis 1 is out of bounds for array of dimension 1
This is the original run:
Number of gates for each filt... | https://stackoverflow.com/questions/77058057/i-get-multi-class-error-when-trying-to-use-roc-auc-score-from-scikit-learn-even | python, machine-learning, scikit-learn | 1,694,076,922 |
se_47145841 | stackoverflow | MACHINE_LEARNING | How to install TensorFlow in MacOS? | How to install TensorFlow in MacOS?
Can anyone tell me easiest way to install TensorFlow in my MacOS specifically Apple Silicon & Intel MacBook?
I have tried below command using virtualenv in my Mac but it doesn't worked!
virtualenv --system-site-packages ~/tensorflow
-bash: virtualenv: command not found
Is there any... | https://stackoverflow.com/questions/47145841/how-to-install-tensorflow-in-macos | macos, tensorflow, machine-learning, apple-silicon | 1,510,002,629 |
se_77179215 | stackoverflow | MACHINE_LEARNING | TF Lite shows only zeros on prediction | TF Lite shows only zeros on prediction
I'm building a model in Tensorflow 2.10 for a classification problem. The model works fine on PC, but when converted to TF Lite, it shows only zeros in the prediction list. Model was tested on Android 13 using Flutter.
I want to repair the model but I don't see any error that wou... | https://stackoverflow.com/questions/77179215/tf-lite-shows-only-zeros-on-prediction | python, dart, tensorflow, machine-learning, tensorflow-lite | 1,695,724,702 |
se_58946738 | stackoverflow | MACHINE_LEARNING | scikit-learn not importing in jupyter notebook | scikit-learn not importing in jupyter notebook
I installed scikit-learn both using pip and conda commandas. Whenever I check the package, it shows that it is already installed but, whenever I try import it, it shows error.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
fr... | https://stackoverflow.com/questions/58946738/scikit-learn-not-importing-in-jupyter-notebook | python, python-3.x, machine-learning, scikit-learn, linear-regression | 1,574,224,341 |
se_79687559 | stackoverflow | MACHINE_LEARNING | Differentiable weight setting in flax NNX | Differentiable weight setting in flax NNX
I'm doing some experiments with Flax NNX (not Linen!).
What I'm trying to do is compute the weights of a network using another network:
A hypernetwork receives some input parameters W and outputs a set of weights.
A target network is initialized with the same structure and rec... | https://stackoverflow.com/questions/79687559/differentiable-weight-setting-in-flax-nnx | machine-learning, neural-network, flax | 1,751,465,072 |
se_29089246 | stackoverflow | MACHINE_LEARNING | How to use the OneVsRestClassifier in Scikit-learn to analyse the performance of predicting each individual class with multi-class classification? | How to use the OneVsRestClassifier in Scikit-learn to analyse the performance of predicting each individual class with multi-class classification?
In the OneVsRestClassifier documentation on the scikit-learn website it states the following:
"Since each class is represented by one and one classifier only, it is possib... | https://stackoverflow.com/questions/29089246/how-to-use-the-onevsrestclassifier-in-scikit-learn-to-analyse-the-performance-of | machine-learning, scikit-learn | 1,426,551,467 |
se_63405239 | stackoverflow | MACHINE_LEARNING | What happens if you use LinearRegression with OneVsRestClassifier | What happens if you use LinearRegression with OneVsRestClassifier
I'd like to understand what happens under the hood of scikitlearn OneVsRestClassifier when we use LinearRegression as estimator. Does it create one LinearRegressor per class and apply a softmax function to return an output class? Documentation is not cl... | https://stackoverflow.com/questions/63405239/what-happens-if-you-use-linearregression-with-onevsrestclassifier | python, machine-learning, scikit-learn, classification | 1,597,368,084 |
se_58346524 | stackoverflow | MACHINE_LEARNING | Faster Kmeans Clustering on High-dimensional Data with GPU Support | Faster Kmeans Clustering on High-dimensional Data with GPU Support
We've been using Kmeans for clustering our logs.
A typical dataset has 10 mill. samples with 100k+ features.
To find the optimal k - we run multiple Kmeans in parallel and pick the one with the best silhouette score. In 90% of the cases we end up wit... | https://stackoverflow.com/questions/58346524/faster-kmeans-clustering-on-high-dimensional-data-with-gpu-support | tensorflow, machine-learning, pyspark, cluster-analysis, k-means | 1,570,817,606 |
se_79716660 | stackoverflow | MACHINE_LEARNING | Model Summary not picking up from Codebert model | Model Summary not picking up from Codebert model
I am fine tuning a CodeBert Model using my custom Dataset and Tokenizers. I tried to unfreeze the last 4 layers of the model. When checking if the layers are unfrozen it shows me which layers are not frozen. Following is the code that I am using.
def create_model(
b... | https://stackoverflow.com/questions/79716660/model-summary-not-picking-up-from-codebert-model | python, machine-learning, large-language-model, bert-language-model | 1,753,646,480 |
se_70255620 | stackoverflow | MACHINE_LEARNING | xgboost : TypeError: predict() got an unexpected keyword argument 'pred_contribs' | xgboost : TypeError: predict() got an unexpected keyword argument 'pred_contribs'
I trained a model using xgboost v0.90 to be compatible with AWS SageMaker ML Engine. I am doing the usual encoding and hyper-parameter tuning. Some code below:
import pandas as pd
import pickle
from xgboost import XGBRegressor
fr... | https://stackoverflow.com/questions/70255620/xgboost-typeerror-predict-got-an-unexpected-keyword-argument-pred-contribs | python, machine-learning, xgboost | 1,638,857,400 |
se_38888398 | stackoverflow | MACHINE_LEARNING | semantic segmentation and object detection | semantic segmentation and object detection
This thread discusses the comparison of different computer vision concepts. Fully Convolutional Networks for Semantic Segmentation
is a very popular deep learning approach for semantic segmentation. What are the popular or state-of-the-art deep learning approaches for object... | https://stackoverflow.com/questions/38888398/semantic-segmentation-and-object-detection | machine-learning, deep-learning, neural-network, computer-vision, image-segmentation | 1,470,895,482 |
se_79641780 | stackoverflow | MACHINE_LEARNING | YOLOv8 Custom Model Fails to Detect Card Elements — What Am I Doing Wrong? | YOLOv8 Custom Model Fails to Detect Card Elements — What Am I Doing Wrong?
I’m working on a card verification system where the goal is to detect fixed visual elements on a card (e.g., logo, photo, chip, signature) using computer vision.
Given a photo of a card, I want to detect whether certain key elements are present... | https://stackoverflow.com/questions/79641780/yolov8-custom-model-fails-to-detect-card-elements-what-am-i-doing-wrong | python, machine-learning, deep-learning, yolov8, ultralytics | 1,748,420,130 |
se_60785113 | stackoverflow | MACHINE_LEARNING | NLP Named Entity Recognition | NLP Named Entity Recognition
I want to use Named Entity Recognition algorithm for extract the names and locations from the text without using any libraries.
Example:
American Airlines said it would launch a direct flight to Bengaluru.
Answer:
Entity: American Airlines
Location: Bengaluru
What is the best practice ... | https://stackoverflow.com/questions/60785113/nlp-named-entity-recognition | machine-learning, nlp, stanford-nlp, named-entity-recognition | 1,584,772,381 |
se_78839421 | stackoverflow | MACHINE_LEARNING | KeyError in Decision Tree during prediction | KeyError in Decision Tree during prediction
I want to create predict and predict_proba methods in my DecisionTreeClassifier implementation, but it gives the error
Traceback (most recent call last):
File "c:\Users\Nijat\project.py", line 136, in <module>
print(model.predict(X))
^^^^^^^^^^^^^^^^
File "... | https://stackoverflow.com/questions/78839421/keyerror-in-decision-tree-during-prediction | python, machine-learning, decision-tree | 1,722,952,201 |
se_44213659 | stackoverflow | MACHINE_LEARNING | Neural Network converging to zero output | Neural Network converging to zero output
I am trying to train this neural network to make predictions on some data.
I tried it on a small dataset (around 100 records) and it was working like a charm. Then I plugged the new dataset and I found out the NN converges to 0 output and the error converges approximately to th... | https://stackoverflow.com/questions/44213659/neural-network-converging-to-zero-output | python, python-2.7, machine-learning, neural-network, classification | 1,495,866,096 |
se_79698818 | stackoverflow | MACHINE_LEARNING | Can I save and load a Keras Model with Feature Names added? | Can I save and load a Keras Model with Feature Names added?
I have data where I need to use numpy's get_dummies to convert the One Hot Encoding. When I train from a larger dataset I get all the possible encodings. When I predict I could possible only have a subset of all the possible encodings. When using a Keras m... | https://stackoverflow.com/questions/79698818/can-i-save-and-load-a-keras-model-with-feature-names-added | machine-learning, keras | 1,752,266,668 |
se_76959397 | stackoverflow | MACHINE_LEARNING | i could not installl a openpose library from c++ for pose detection | i could not installl a openpose library from c++ for pose detection
I have installed the OpenPose library for my pose detection project using C++. However, I am encountering difficulties with the installation process, particularly when trying to download models as per the instructions provided on https://sourceforge.n... | https://stackoverflow.com/questions/76959397/i-could-not-installl-a-openpose-library-from-c-for-pose-detection | c++, machine-learning, openpose, pose-detection | 1,692,777,376 |
se_79712795 | stackoverflow | MACHINE_LEARNING | Python 3 changes variable even after if condition fails | Python 3 changes variable even after if condition fails
I have a kaggle notebook(link here). The notebook iterates over a list of number(candidate_max_leaf_nodes) and then gets a mae for each number by massing it as a parameter(ignore the other parameters) to the get_mae function.
The goal is to store the value from t... | https://stackoverflow.com/questions/79712795/python-3-changes-variable-even-after-if-condition-fails | python, machine-learning, jupyter-notebook, scope, kaggle | 1,753,331,114 |
se_73410125 | stackoverflow | MACHINE_LEARNING | Error: No class Attributes are defined while using golang golearn | Error: No class Attributes are defined while using golang golearn
I'm using the knn example from golearn but I'm adding an instance manually to test the iris_headers.csv. I'm getting a "No class Attributes are defined" even though the data looks to be good. I can pull in two different csv files, one with only one line... | https://stackoverflow.com/questions/73410125/error-no-class-attributes-are-defined-while-using-golang-golearn | go, machine-learning | 1,660,862,250 |
se_76650779 | stackoverflow | MACHINE_LEARNING | Discrepancy between Optuna's AUC ROC and scikit-learn's AUC ROC for binary classification problem | Discrepancy between Optuna's AUC ROC and scikit-learn's AUC ROC for binary classification problem
I'm working on a binary classification problem where I have ~30 features of enzyme substrates to predict EC1 and EC2. I'm using xgboost with optuna for hyperparameter tuning. However, I'm observing a discrepancy b... | https://stackoverflow.com/questions/76650779/discrepancy-between-optunas-auc-roc-and-scikit-learns-auc-roc-for-binary-class | python, machine-learning, classification, xgboost, optuna | 1,688,965,615 |
se_59888227 | stackoverflow | MACHINE_LEARNING | How should metrics be added to a multi-headed TensorFlow estimator? | How should metrics be added to a multi-headed TensorFlow estimator?
I previously created metrics for a TensorFlow Classifier referencing predictions['logits'] to calculate the metrics. I have changed the model from a Classifier to an Estimator in order to enable multi-objective learning (using MultiHead). However, thi... | https://stackoverflow.com/questions/59888227/how-should-metrics-be-added-to-a-multi-headed-tensorflow-estimator | python, tensorflow, machine-learning, metrics | 1,579,820,314 |
se_79702358 | stackoverflow | MACHINE_LEARNING | AWS SageMaker - Custom Inference With HuggingFace Model | AWS SageMaker - Custom Inference With HuggingFace Model
For context, I'm currently working in a JupyterLab space in SageMaker studio.
My goal is to deploy a HuggingFace Llama model for batch transform inference. The data I will be passing in to the LLM is in an S3 bucket in the same AWS account. The data does require ... | https://stackoverflow.com/questions/79702358/aws-sagemaker-custom-inference-with-huggingface-model | python, amazon-web-services, machine-learning, amazon-sagemaker, large-language-model | 1,752,596,259 |
se_79709978 | stackoverflow | MACHINE_LEARNING | Keras ResNet model trains but does not evaluate | Keras ResNet model trains but does not evaluate
I am trying to use Keras' implementation of ResNet50 and adapting it to work on the tiny-imagenet dataset from huggingface.
I can use the model to train on the data and collect training and validation metrics without much trouble, but when I try to test it the model simp... | https://stackoverflow.com/questions/79709978/keras-resnet-model-trains-but-does-not-evaluate | python, tensorflow, machine-learning, keras, resnet | 1,753,165,017 |
se_74191935 | stackoverflow | MACHINE_LEARNING | gym env.render() on Nth step | gym env.render() on Nth step
I am using gym==0.26.0 and I am trying to make my environment render only on each Nth step. So that my nn is learning fast but that I can also see some of the progress as the image and not just rewards in my terminal. With the newer versions of gym, it seems like I need to specify the rend... | https://stackoverflow.com/questions/74191935/gym-env-render-on-nth-step | python, machine-learning, deep-learning, reinforcement-learning, openai-gym | 1,666,690,342 |
se_79708778 | stackoverflow | MACHINE_LEARNING | What is the meaning of Data variables: *empty* in working with .nc file? | What is the meaning of Data variables: *empty* in working with .nc file?
I had the task of analyzing a .nc file. I have not worked with it before, so I did some research online and found some codes.
I was exploring the dataset. I tried:
I am using Debian 12, Python3 and Jupyter notebook
# import needed libraries
impor... | https://stackoverflow.com/questions/79708778/what-is-the-meaning-of-data-variables-empty-in-working-with-nc-file | python, machine-learning, data-analysis, python-xarray | 1,753,086,619 |
se_79702840 | stackoverflow | MACHINE_LEARNING | How to transfer collaborator metadata in OpenFL | How to transfer collaborator metadata in OpenFL
I am using securefederatedai/openfl workflow api, I want to transfer some of collaborator details, general ones like class distribution, class ratio, data mean, median.
How can I securely transfer this data to aggregator.
Any guidance will be helpful
Ref: https://openfl.... | https://stackoverflow.com/questions/79702840/how-to-transfer-collaborator-metadata-in-openfl | machine-learning, openfl, federated-learning | 1,752,631,911 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.