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_79650016 | stackoverflow | MACHINE_LEARNING | Neural Network model in PyTorch prediction problem for anomaly detection in a simulated irrigation system | Neural Network model in PyTorch prediction problem for anomaly detection in a simulated irrigation system
I'm working on my final studies project, which is detecting anomalies in an irrigation system.
We simulated the irrigation network on a limited environment as you can see in the photo below.the model we created
Th... | https://stackoverflow.com/questions/79650016/neural-network-model-in-pytorch-prediction-problem-for-anomaly-detection-in-a-si | python, machine-learning, pytorch, artificial-intelligence | 1,748,882,118 |
se_74232893 | stackoverflow | MACHINE_LEARNING | Machine learning serving using either kserve, seldon, or BentoML | Machine learning serving using either kserve, seldon, or BentoML
What is better, kserve, seldon core or BentoML? And what are the advantages /disavantages and feature of each one?
I did a lot of research and couldn't find a clear answer. | https://stackoverflow.com/questions/74232893/machine-learning-serving-using-either-kserve-seldon-or-bentoml | machine-learning, serving, seldon-core | 1,666,947,423 |
se_79647350 | stackoverflow | MACHINE_LEARNING | Looking for an efficent JAX function to reconstruct an image from patches | Looking for an efficent JAX function to reconstruct an image from patches
I have a set of images in (c, h, w) jax arrays. These arrays have been converted to (patch_index, patch_dim) arrays where patch_dim == c * h * w.
I am trying to reconstruct the original images from the patches. Here is vanilla python code that w... | https://stackoverflow.com/questions/79647350/looking-for-an-efficent-jax-function-to-reconstruct-an-image-from-patches | python, machine-learning, deep-learning, computer-vision, jax | 1,748,767,774 |
se_53436231 | stackoverflow | MACHINE_LEARNING | Normalized Cross-Correlation in Python | Normalized Cross-Correlation in Python
I have been struggling the last days trying to compute the degrees of freedom of two pair of vectors (x and y) following reference of Chelton (1983) which is:
degrees of freedom according to Chelton(1983)
and I can't find a proper way to calculate the normalized cross correlati... | https://stackoverflow.com/questions/53436231/normalized-cross-correlation-in-python | python, numpy, machine-learning, correlation, cross-correlation | 1,542,909,858 |
se_79645357 | stackoverflow | MACHINE_LEARNING | Problem in fine tuning DeepLabV3Plus using keras_cv for Semantic Segmentation | Problem in fine tuning DeepLabV3Plus using keras_cv for Semantic Segmentation
I'm using open-images-v7 dataset (accessing via fiftyone lib) and keras_cv lib to fine tune DeepLabV3Plus with mobilenet_v3_small backbone, but the accuracy doesn't improve with epochs at all, and I'm getting shape warning.
Dataset Preparati... | https://stackoverflow.com/questions/79645357/problem-in-fine-tuning-deeplabv3plus-using-keras-cv-for-semantic-segmentation | python, machine-learning, keras, deep-learning, semantic-segmentation | 1,748,603,651 |
se_42521400 | stackoverflow | MACHINE_LEARNING | Calculating cross entropy in TensorFlow | Calculating cross entropy in TensorFlow
I am having a hard time with calculating cross entropy in TensorFlow. In particular, I am using the function:
tf.nn.softmax_cross_entropy_with_logits()
Using what is seemingly simple code, I can only get it to return a zero:
import tensorflow as tf
import numpy as np
sess = tf... | https://stackoverflow.com/questions/42521400/calculating-cross-entropy-in-tensorflow | python, machine-learning, tensorflow, cross-entropy | 1,488,329,902 |
se_79395477 | stackoverflow | MACHINE_LEARNING | How to save a Dataset in multiple shards using `tf.data.Dataset.save` | How to save a Dataset in multiple shards using `tf.data.Dataset.save`
How can I save a tf.data.Dataset in multiple shards using tf.data.Dataset.save()? I am reading in my dataset from CSV using tf.data.experimental.make_csv_dataset.
The TF docs here are not very helpful. There is a shard_func argument, but the exampl... | https://stackoverflow.com/questions/79395477/how-to-save-a-dataset-in-multiple-shards-using-tf-data-dataset-save | python, tensorflow, machine-learning | 1,738,109,334 |
se_55705749 | stackoverflow | MACHINE_LEARNING | Should Test and Dev Set have different distribution from Training Set an Dev Set | Should Test and Dev Set have different distribution from Training Set an Dev Set
Suppose I am building a network to localize an object. My training data consists of images captured at 5 different locations, and its a small data set ( each location has around 2k images ). Should I add all the images, shuffle them and t... | https://stackoverflow.com/questions/55705749/should-test-and-dev-set-have-different-distribution-from-training-set-an-dev-set | machine-learning, neural-network, deep-learning, conv-neural-network | 1,555,409,618 |
se_57492687 | stackoverflow | MACHINE_LEARNING | Batch Predictions in ML.NET with a MultiClass Classification Algorithm | Batch Predictions in ML.NET with a MultiClass Classification Algorithm
I am trying to applying batch predictions as shown within the Binary Classification, example to a Multi Class Classification
Many of the examples demonstrated across google and Microsoft work, show a single prediction to demonstrate the capability... | https://stackoverflow.com/questions/57492687/batch-predictions-in-ml-net-with-a-multiclass-classification-algorithm | c#, .net, machine-learning, ml.net | 1,565,777,648 |
se_79639909 | stackoverflow | MACHINE_LEARNING | Prediction by trained model of sjwhitworth/golearn | Prediction by trained model of sjwhitworth/golearn
Lately I tried a random forest model by golearn.
I want to use saved model (.gob) and only explain variables.
As long as I explored, the only way I found was to prepare a template base.FixedDataGrid from the training data.
// buildTestInstance constructs a new test in... | https://stackoverflow.com/questions/79639909/prediction-by-trained-model-of-sjwhitworth-golearn | go, machine-learning, random-forest, gob | 1,748,327,085 |
se_36107820 | stackoverflow | MACHINE_LEARNING | How to tune parameters in Random Forest, using Scikit Learn? | How to tune parameters in Random Forest, using Scikit Learn?
class sklearn.ensemble.RandomForestClassifier(n_estimators=10,
criterion='gini',
max_depth=None,
min_samples_split=2,
... | https://stackoverflow.com/questions/36107820/how-to-tune-parameters-in-random-forest-using-scikit-learn | python, parameters, machine-learning, scikit-learn, random-forest | 1,458,425,448 |
se_79134990 | stackoverflow | MACHINE_LEARNING | Fast AI Siamese model not improving | Fast AI Siamese model not improving
So I was following this tutorial: Fast Ai Siamese, however after I completed it, I got 50% accuracy. I tried loads of things, but nothing worked. So the only place where I think the problem could be is in the Siamese implementation itself, but I have little experience with fast.ai a... | https://stackoverflow.com/questions/79134990/fast-ai-siamese-model-not-improving | machine-learning, pytorch, computer-vision, fast-ai, siamese-network | 1,730,146,664 |
se_38015181 | stackoverflow | MACHINE_LEARNING | Accuracy Score ValueError: Can't Handle mix of binary and continuous target | Accuracy Score ValueError: Can't Handle mix of binary and continuous target
I'm using linear_model.LinearRegression from scikit-learn as a predictive model. It works and it's perfect. I have a problem to evaluate the predicted results using the accuracy_score metric.
This is my true Data :
array([1, 1, 0, 0, 0, 0,... | https://stackoverflow.com/questions/38015181/accuracy-score-valueerror-cant-handle-mix-of-binary-and-continuous-target | python, machine-learning, scikit-learn, linear-regression, prediction | 1,466,776,637 |
se_70906050 | stackoverflow | MACHINE_LEARNING | How many num_workers in DataLoader? | How many num_workers in DataLoader?
I have a machine with 1500 Gb of ram and 112 cores but no GPU. I would like to know how to calculate suitable number of num_workers in DataLoader and batch size.
I have to make the inference with Inception-v3(pytorch) on 80,000,000 images.
I tried with a batch size of 30k and num_wo... | https://stackoverflow.com/questions/70906050/how-many-num-workers-in-dataloader | python, machine-learning, deep-learning, pytorch | 1,643,463,981 |
se_71688298 | stackoverflow | MACHINE_LEARNING | export SHAP waterfall plot to dataframe | export SHAP waterfall plot to dataframe
I am working on a binary classification using random forest model, neural networks in which am using SHAP to explain the model predictions. I followed the tutorial and wrote the below code to get the waterfall plot shown below
row_to_show = 20
data_for_prediction = ord_test_t.il... | https://stackoverflow.com/questions/71688298/export-shap-waterfall-plot-to-dataframe | python, dataframe, machine-learning, neural-network, shap | 1,648,710,649 |
se_79619113 | stackoverflow | MACHINE_LEARNING | Generating partial string as output after fine-tuning T5 model | Generating partial string as output after fine-tuning T5 model
I'm using fine-tuned T5 model for performing spell checks in my dataset of consisting of reviews. However, I'm facing an issue where the model when performing spell checks does not give entire string as an output or sometimes repeats the phrases of the giv... | https://stackoverflow.com/questions/79619113/generating-partial-string-as-output-after-fine-tuning-t5-model | python, machine-learning, nlp, simpletransformers | 1,747,119,840 |
se_63006575 | stackoverflow | MACHINE_LEARNING | What is the difference between MaxPool and MaxPooling layers in Keras? | What is the difference between MaxPool and MaxPooling layers in Keras?
I just started working with keras and noticed that there are two layers with very similar names for max-pooling: MaxPool and MaxPooling. I was surprised that I couldn't find the difference between these two on Google; so I am wondering what the dif... | https://stackoverflow.com/questions/63006575/what-is-the-difference-between-maxpool-and-maxpooling-layers-in-keras | python, tensorflow, machine-learning, keras, deep-learning | 1,595,299,480 |
se_79631112 | stackoverflow | MACHINE_LEARNING | How do you properly format data for CNN classification? | How do you properly format data for CNN classification?
I'm trying to use LeNet to classify univariate time series data with 300 time steps.
num_channels = 1;
num_classes = 3;
filterSize = 5;
numFilters = 32;
num_of_features = size(X_train(1, :), 2);
assert(num_of_features==300);
net = dlnetwork;
LeNeT = [
% fea... | https://stackoverflow.com/questions/79631112/how-do-you-properly-format-data-for-cnn-classification | matlab, machine-learning, time-series, conv-neural-network | 1,747,772,228 |
se_79631762 | stackoverflow | MACHINE_LEARNING | Error in PyTorch when trying to create a generative AI (autoregression) Model | Error in PyTorch when trying to create a generative AI (autoregression) Model
I'm trying to build an AI Model, but am getting this error:
Traceback (most recent call last):
File "F:\Pendrive\!!! Pivate !!!\Other\Other\Private\AI\PyTorch\Model_1\main.py", line 20, in <module>
model.pretrain_on_corpus(
File "F:\... | https://stackoverflow.com/questions/79631762/error-in-pytorch-when-trying-to-create-a-generative-ai-autoregression-model | python, machine-learning, error-handling, pytorch, artificial-intelligence | 1,747,822,302 |
se_56496708 | stackoverflow | MACHINE_LEARNING | F1 Score: ValueError: Classification metrics can't handle a mix of multiclass and multilabel-indicator targets | F1 Score: ValueError: Classification metrics can't handle a mix of multiclass and multilabel-indicator targets
I have multi-class labeled text classification problem with 2000 different labels and I do classification using LSTM.
Label Encoder of target variable
LSTM layer with Embedd Layer
Error metric is F2 scor... | https://stackoverflow.com/questions/56496708/f1-score-valueerror-classification-metrics-cant-handle-a-mix-of-multiclass-an | python, machine-learning, scikit-learn, data-science, lstm | 1,559,919,337 |
se_79626389 | stackoverflow | MACHINE_LEARNING | How to use graph convolutional neural network (GCNN) to predict the appropriate patterns to solve an scheduling problem | How to use graph convolutional neural network (GCNN) to predict the appropriate patterns to solve an scheduling problem
I am working on a scheduling problem where I am willing to solve that by Graph Convolutional Neural Network (GCNN). The problem is stated as follows:
There is an assembly product graph with $\text{G(... | https://stackoverflow.com/questions/79626389/how-to-use-graph-convolutional-neural-network-gcnn-to-predict-the-appropriate | algorithm, machine-learning, graph, conv-neural-network | 1,747,474,845 |
se_79628713 | stackoverflow | MACHINE_LEARNING | torch.cuda.device_count() return 0 when torch.cuda.is_available() return True in jupyter notebook | torch.cuda.device_count() return 0 when torch.cuda.is_available() return True in jupyter notebook
I got an error in jupyternotebook said that
RuntimeError: Attempting to deserialize object on CUDA device 0 but torch.cuda.device_count() is 0. Please use torch.load with map_location to map your storages to an existing d... | https://stackoverflow.com/questions/79628713/torch-cuda-device-count-return-0-when-torch-cuda-is-available-return-true-in | python, machine-learning, jupyter-notebook, pytorch, cuda | 1,747,656,598 |
se_79597666 | stackoverflow | MACHINE_LEARNING | RuntimeError: mat1 and mat2 shapes cannot be multiplied when using gradcam | RuntimeError: mat1 and mat2 shapes cannot be multiplied when using gradcam
I made a cnn model like this and trained the batch dataset.
My data preprocessing code was this
train_dir = r'C:\Users\roobe\BACH\norm\train\patches\train' # νλ ¨ λ°μ΄ν° ν΄λ
val_dir = r'C:\Users\roobe\BACH\norm\train\patches\val' # κ²μ¦ λ°μ΄ν° ν΄λ
# λ°μ΄ν°... | https://stackoverflow.com/questions/79597666/runtimeerror-mat1-and-mat2-shapes-cannot-be-multiplied-when-using-gradcam | python, tensorflow, machine-learning, deep-learning | 1,745,904,934 |
se_37293642 | stackoverflow | MACHINE_LEARNING | How to tell Keras stop training based on loss value? | How to tell Keras stop training based on loss value?
Currently I use the following code:
callbacks = [
EarlyStopping(monitor='val_loss', patience=2, verbose=0),
ModelCheckpoint(kfold_weights_path, monitor='val_loss', save_best_only=True, verbose=0),
]
model.fit(X_train.astype('float32'), Y_train, batch_size=b... | https://stackoverflow.com/questions/37293642/how-to-tell-keras-stop-training-based-on-loss-value | python, machine-learning, neural-network, conv-neural-network, keras | 1,463,558,546 |
se_52314401 | stackoverflow | MACHINE_LEARNING | xgboost.plot_tree: binary feature interpretation | xgboost.plot_tree: binary feature interpretation
I've built an XGBoost model and seek to examine the individual estimators. For reference, this was a binary classification task with discrete and continuous input features. The input feature matrix is a scipy.sparse.csr_matrix.
When I went to examine an individual estim... | https://stackoverflow.com/questions/52314401/xgboost-plot-tree-binary-feature-interpretation | python, machine-learning, xgboost | 1,536,843,966 |
se_78636296 | stackoverflow | MACHINE_LEARNING | Wrong machine learning predictions at every run | Wrong machine learning predictions at every run
I trained a machine learning model, and a few of the same rows (around 100 out of 1800) in my test set are giving wrong predictions at every run (10 times) with different seeds. Is there anything I should do about it e.g. throw it in the train set in exchange for some da... | https://stackoverflow.com/questions/78636296/wrong-machine-learning-predictions-at-every-run | machine-learning | 1,718,699,830 |
se_36791959 | stackoverflow | MACHINE_LEARNING | How to label/track HOG detections in order to eliminate false positives? | How to label/track HOG detections in order to eliminate false positives?
I'm working with hog svm in order to detect people in a video.
I actually trained my own hog detector in order to have a flexible training and detection system. But my own hog detector has many false positives. A way to make it perform better is ... | https://stackoverflow.com/questions/36791959/how-to-label-track-hog-detections-in-order-to-eliminate-false-positives | c++, opencv, machine-learning, computer-vision, object-detection | 1,461,322,705 |
se_79628410 | stackoverflow | MACHINE_LEARNING | Problem with installing Docling for Python in MacOS | Problem with installing Docling for Python in MacOS
When I am installing Docling which is a document processing library in my terminal, it raises the error
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
... | https://stackoverflow.com/questions/79628410/problem-with-installing-docling-for-python-in-macos | python, machine-learning, computer-vision, ocr | 1,747,645,133 |
se_79226995 | stackoverflow | MACHINE_LEARNING | Why is (remote) Jupyter busy during ML training, but not actually doing anything? | Why is (remote) Jupyter busy during ML training, but not actually doing anything?
I am training an ML model with PyTorch on my own dedicated remote server, using Jupyter as my IDE.
Around 120 epochs (about 2 hours into training), the Jupyter cell stops updating the output, but the status bar still says busy as the ker... | https://stackoverflow.com/questions/79226995/why-is-remote-jupyter-busy-during-ml-training-but-not-actually-doing-anything | machine-learning, jupyter-notebook, pytorch | 1,732,629,311 |
se_64987430 | stackoverflow | MACHINE_LEARNING | What exactly does the forward function output in Pytorch? | What exactly does the forward function output in Pytorch?
This example is taken verbatim from the PyTorch Documentation. Now I do have some background on Deep Learning in general and know that it should be obvious that the forward call represents a forward pass, passing through different layers and finally reaching th... | https://stackoverflow.com/questions/64987430/what-exactly-does-the-forward-function-output-in-pytorch | python, machine-learning, neural-network, pytorch | 1,606,224,078 |
se_75664004 | stackoverflow | MACHINE_LEARNING | Install pgvector extension on mac | Install pgvector extension on mac
I'm trying to install postgres vector extension on my mac but am getting
ERROR: extension "vector" has no installation script nor update path for version "0.4.0".
Here's what I did:
Follow the installation guide as shown on github:
But when I ran CREATE EXTENSION vector; got an e... | https://stackoverflow.com/questions/75664004/install-pgvector-extension-on-mac | postgresql, machine-learning, vectorization | 1,678,203,162 |
se_79619583 | stackoverflow | MACHINE_LEARNING | Pytorch - torchvision model getting different results in python and kotlin | Pytorch - torchvision model getting different results in python and kotlin
I have a torchvision model which is mobilenet without the classification head to use as a similarity search. I have saved it as a torchvision model. When I use it within python with the similarity search it gets the right result but within kotl... | https://stackoverflow.com/questions/79619583/pytorch-torchvision-model-getting-different-results-in-python-and-kotlin | python, kotlin, machine-learning, pytorch, torchvision | 1,747,137,143 |
se_69554879 | stackoverflow | MACHINE_LEARNING | Failed to load dynamic library 'libtensorflowlite_c.so': dlopen failed: library "libtensorflowlite_c.so" not found | Failed to load dynamic library 'libtensorflowlite_c.so': dlopen failed: library "libtensorflowlite_c.so" not found
When I tried to call
/// runs and transforms the data π€
this._interpreter.run(input, output);
this._interpreter = await Interpreter.fromAsset('mobilefacenet.tflite',
options: inter... | https://stackoverflow.com/questions/69554879/failed-to-load-dynamic-library-libtensorflowlite-c-so-dlopen-failed-library | flutter, machine-learning, tensorflow-lite, face-detection | 1,634,125,241 |
se_70620074 | stackoverflow | MACHINE_LEARNING | Serving multiple ML models using MLflow in a single VM | Serving multiple ML models using MLflow in a single VM
I have setup an MLflow service in a VM and I am able to serve the model using the mlflow serve command. How can I host multiple models in a single VM?
I am using the below command to serve a model using MLflow in a VM.
Command:
/mlflow models serve -m models:/$Mod... | https://stackoverflow.com/questions/70620074/serving-multiple-ml-models-using-mlflow-in-a-single-vm | apache-spark, machine-learning, databricks, mlflow | 1,641,552,500 |
se_79621002 | stackoverflow | MACHINE_LEARNING | remove ultralytics dependency while loading yolo models | remove ultralytics dependency while loading yolo models
I have trained a classification model using yolo11n , now i have to write its inference script , but the problem is for development and deployment I have python version 3.6, but yolo and ultralytics supports python version 3.8 and above only , I have tried to con... | https://stackoverflow.com/questions/79621002/remove-ultralytics-dependency-while-loading-yolo-models | python, machine-learning, artificial-intelligence | 1,747,210,092 |
se_79623456 | stackoverflow | MACHINE_LEARNING | Tidymodels: Use step_dummy() for multiple binary classifications? | Tidymodels: Use step_dummy() for multiple binary classifications?
I am a little bit lost in tidymodels. I have a some data from topicmodeling:
prevalent_topic: factor variable with most prevalent topic, ranging from "Topic_1" to "Topic_5"
value1 and value2: two numeric variables used as predictor
I want to predict/c... | https://stackoverflow.com/questions/79623456/tidymodels-use-step-dummy-for-multiple-binary-classifications | machine-learning, classification, tidymodels, recipe | 1,747,315,838 |
se_53972159 | stackoverflow | MACHINE_LEARNING | How does Pytorch's "Fold" and "Unfold" work? | How does Pytorch's "Fold" and "Unfold" work?
I've gone through the official doc. I'm having a hard time understanding what this function is used for and how it works. Can someone explain this in layman's terms? | https://stackoverflow.com/questions/53972159/how-does-pytorchs-fold-and-unfold-work | python, machine-learning, deep-learning, computer-vision, pytorch | 1,546,107,254 |
se_42480111 | stackoverflow | MACHINE_LEARNING | How do I print the model summary in PyTorch? | How do I print the model summary in PyTorch?
How do I print the summary of a model in PyTorch like what model.summary() does in Keras:
Model Summary:
____________________________________________________________________________________________________
Layer (type) Output Shape Param # C... | https://stackoverflow.com/questions/42480111/how-do-i-print-the-model-summary-in-pytorch | python, machine-learning, deep-learning, pytorch | 1,488,180,942 |
se_61598771 | stackoverflow | MACHINE_LEARNING | `squeeze()` vs `unsqueeze()` in PyTorch | `squeeze()` vs `unsqueeze()` in PyTorch
I don't understand what squeeze() and unsqueeze() do to a tensor, even after looking at the docs and related questions.
I tried to understand it by exploring it myself in python. I first created a random tensor with
x = torch.rand(3,2,dtype=torch.float)
>>> x
tensor([[0.3703, 0.... | https://stackoverflow.com/questions/61598771/squeeze-vs-unsqueeze-in-pytorch | python, machine-learning, deep-learning, pytorch, tensor | 1,588,615,598 |
se_42479902 | stackoverflow | MACHINE_LEARNING | What does `view()` do in PyTorch? | What does `view()` do in PyTorch?
What does view() do to the tensor x? What do negative values mean?
x = x.view(-1, 16 * 5 * 5) | https://stackoverflow.com/questions/42479902/what-does-view-do-in-pytorch | python, machine-learning, memory, pytorch, tensor | 1,488,180,070 |
se_54307225 | stackoverflow | MACHINE_LEARNING | `stack()` vs `cat()` in PyTorch | `stack()` vs `cat()` in PyTorch
OpenAI's REINFORCE and actor-critic example for reinforcement learning has the following code:
REINFORCE:
policy_loss = torch.cat(policy_loss).sum()
actor-critic:
loss = torch.stack(policy_losses).sum() + torch.stack(value_losses).sum()
One is using torch.cat, the other uses torch.sta... | https://stackoverflow.com/questions/54307225/stack-vs-cat-in-pytorch | python, machine-learning, deep-learning, pytorch, concatenation | 1,548,156,287 |
se_44856691 | stackoverflow | MACHINE_LEARNING | How do you alter the size of a Pytorch Dataset? | How do you alter the size of a Pytorch Dataset?
Say I am loading MNIST from torchvision.datasets.MNIST, but I only want to load in 10000 images total, how would I slice the data to limit it to only some number of data points? I understand that the DataLoader is a generator yielding data in the size of the specified b... | https://stackoverflow.com/questions/44856691/how-do-you-alter-the-size-of-a-pytorch-dataset | python, machine-learning, dataset, torch, pytorch | 1,498,873,960 |
se_42704283 | stackoverflow | MACHINE_LEARNING | L1/L2 regularization in PyTorch | L1/L2 regularization in PyTorch
How do I add L1/L2 regularization in PyTorch without manually computing it? | https://stackoverflow.com/questions/42704283/l1-l2-regularization-in-pytorch | python, machine-learning, pytorch, loss-function, regularized | 1,489,089,259 |
se_66488807 | stackoverflow | MACHINE_LEARNING | PyTorch model input shape | PyTorch model input shape
I loaded a custom PyTorch model and I want to find out its input shape. Something like this:
model.input_shape
Is it possible to get this information?
Update: print() and summary() don't show this model's input shape, so they are not what I'm looking for. | https://stackoverflow.com/questions/66488807/pytorch-model-input-shape | python, machine-learning, deep-learning, pytorch, conv-neural-network | 1,614,931,192 |
se_34240703 | stackoverflow | MACHINE_LEARNING | What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits? | What are logits? What is the difference between softmax and softmax_cross_entropy_with_logits?
In the tensorflow API docs they use a keyword called logits. What is it? A lot of methods are written like:
tf.nn.softmax(logits, name=None)
If logits is just a generic Tensor input, why is it named logits?
Secondly, what ... | https://stackoverflow.com/questions/34240703/what-are-logits-what-is-the-difference-between-softmax-and-softmax-cross-entrop | python, machine-learning, tensorflow | 1,449,929,007 |
se_57234095 | stackoverflow | MACHINE_LEARNING | What is the difference between .flatten() and .view(-1) in PyTorch? | What is the difference between .flatten() and .view(-1) in PyTorch?
Both .flatten() and .view(-1) flatten a tensor in PyTorch. What's the difference?
Does .flatten() copy the data of the tensor?
Is .view(-1) faster?
Is there any situation that .flatten() doesn't work? | https://stackoverflow.com/questions/57234095/what-is-the-difference-between-flatten-and-view-1-in-pytorch | python, machine-learning, deep-learning, pytorch | 1,564,245,319 |
se_57237352 | stackoverflow | MACHINE_LEARNING | What does "unsqueeze" do in Pytorch? | What does "unsqueeze" do in Pytorch?
The PyTorch documentation says:
Returns a new tensor with a dimension of size one inserted at the specified position. [...]
>>> x = torch.tensor([1, 2, 3, 4])
>>> torch.unsqueeze(x, 0)
tensor([[ 1, 2, 3, 4]])
>>> torch.unsqueeze(x, 1)
tensor([[ 1],
[ 2],
... | https://stackoverflow.com/questions/57237352/what-does-unsqueeze-do-in-pytorch | python, numpy, machine-learning, deep-learning, pytorch | 1,564,278,223 |
se_46015426 | stackoverflow | MACHINE_LEARNING | How can I parallelize fitting a gradient boosting model with sklearn? | How can I parallelize fitting a gradient boosting model with sklearn?
Relatively new to model building with sklearn. I know cross validation can be parallelized via the n_jobs parameter, but if I'm not using CV, how can I utilize my available cores to speed up model fitting? | https://stackoverflow.com/questions/46015426/how-can-i-parallelize-fitting-a-gradient-boosting-model-with-sklearn | python, machine-learning, scikit-learn | 1,504,366,711 |
se_52887039 | stackoverflow | MACHINE_LEARNING | How to detect hologram overlays like the ones in ID Cards? | How to detect hologram overlays like the ones in ID Cards?
Is there any good way to detect the holograms inside security documents like identity cards? I've tried quite a few methods such as sobel filter, laplacian, among others but its still pretty hard to tell if the card has a hologram over it.
Original Image
Fr... | https://stackoverflow.com/questions/52887039/how-to-detect-hologram-overlays-like-the-ones-in-id-cards | python, opencv, machine-learning, image-processing | 1,539,931,289 |
se_79621382 | stackoverflow | MACHINE_LEARNING | Speaker Diarization | Speaker Diarization
I need to upload an audio file where two or more speakers are having a conversation, and at times their speech overlaps. The requirement is to segment the audio into distinct chunks, each corresponding clearly to a different speaker(Which speaker say what).
I have used speaker diarization for this ... | https://stackoverflow.com/questions/79621382/speaker-diarization | python, machine-learning, artificial-intelligence, audio-processing | 1,747,222,400 |
se_79618769 | stackoverflow | MACHINE_LEARNING | Why is my loss value increasing when I update the biases? | Why is my loss value increasing when I update the biases?
I am currently working on a convolutional neural network in python, and I am currently implementing back propagation. As of now I am just implementing it for the output layer, and I just wrote the code to calculate the derivatives of the bias values.
Here is th... | https://stackoverflow.com/questions/79618769/why-is-my-loss-value-increasing-when-i-update-the-biases | python, machine-learning, conv-neural-network | 1,747,094,140 |
se_40207427 | stackoverflow | MACHINE_LEARNING | what does this notation mean <x1,x2>? | what does this notation mean <x1,x2>?
I was reading about k-strong convexity and came a across an equation like this
f(x_1) >= f(x_2) + <\Delta f(x_2), x_1-x_2> + (k/2)*(||x_1-x_2||^2)
Could some one explain what the notation <> means?
Sorry for the errors with latex. | https://stackoverflow.com/questions/40207427/what-does-this-notation-mean-x1-x2 | machine-learning, statistics, latex, notation, convex-optimization | 1,477,254,026 |
se_79615828 | stackoverflow | MACHINE_LEARNING | Why shap's explainer.model.predict() and model.predict don't match? | Why shap's explainer.model.predict() and model.predict don't match?
I have a machine learning model and I calculated SHAP on it using following code:
import shap
background = shap.kmeans(X_dev, k=100)
explainer = shap.TreeExplainer(model, feature_perturbation="interventional", model_output='probability', data... | https://stackoverflow.com/questions/79615828/why-shaps-explainer-model-predict-and-model-predict-dont-match | python, machine-learning, xgboost, shap | 1,746,904,022 |
se_36979085 | stackoverflow | MACHINE_LEARNING | How to use hog detector to know if a preselected ROI is a person? | How to use hog detector to know if a preselected ROI is a person?
I want to use hog detector in order to know if a ROI is a person or not, I already coded a filtering technique allowing me to select ROIs that can contain a person.
for instance this is what I'm doing:
saving my ROIs as rectangles
for each ROI:
cropp... | https://stackoverflow.com/questions/36979085/how-to-use-hog-detector-to-know-if-a-preselected-roi-is-a-person | c++, opencv, machine-learning, computer-vision, classification | 1,462,181,105 |
se_61385819 | stackoverflow | MACHINE_LEARNING | Trying to use data from coco-ssd to draw a bounding box | Trying to use data from coco-ssd to draw a bounding box
I have been recently inquiring about image recognition and found that JavaScript had an easy to use and beginner friendly way to do this using tensorflow.js. I managed to use the exemplar code for an interesting model I found called coco-ssd. It works really well... | https://stackoverflow.com/questions/61385819/trying-to-use-data-from-coco-ssd-to-draw-a-bounding-box | javascript, tensorflow, machine-learning, computer-vision, tensorflow.js | 1,587,640,247 |
se_47521872 | stackoverflow | MACHINE_LEARNING | Accessing Lasso Regression coefficients after fitting | Accessing Lasso Regression coefficients after fitting
I'm trying to Lasso Regression after having optimal value of Lambda and now the problem is , I want to get the coefficients (weight vector) since I want to compare them with weights of Ridge regression.
lasso = Lasso(alpha=optimal_lmbda, fit_intercept=True, random... | https://stackoverflow.com/questions/47521872/accessing-lasso-regression-coefficients-after-fitting | python, machine-learning, scikit-learn, regression, linear-regression | 1,511,827,518 |
se_33962226 | stackoverflow | MACHINE_LEARNING | Common causes of nans during training of neural networks | Common causes of nans during training of neural networks
I've noticed that a frequent occurrence during training is NANs being introduced.
Often times it seems to be introduced by weights in inner-product/fully-connected or convolution layers blowing up.
Is this occurring because the gradient computation is blowing ... | https://stackoverflow.com/questions/33962226/common-causes-of-nans-during-training-of-neural-networks | machine-learning, neural-network, deep-learning, caffe, gradient-descent | 1,448,645,010 |
se_64742656 | stackoverflow | MACHINE_LEARNING | Machine Learning for NPCs in games: Windows ML or DirectML? | Machine Learning for NPCs in games: Windows ML or DirectML?
Sometimes I read that using Windows ML and/or DirectML can improve the behavior of NPCs in games. It seems that both APIs are suitable, but which one fits better? Or is parallel use for different tasks the best way? If one of them is better for Machine Learni... | https://stackoverflow.com/questions/64742656/machine-learning-for-npcs-in-games-windows-ml-or-directml | windows, machine-learning, windows-machine-learning | 1,604,866,941 |
se_79290968 | stackoverflow | MACHINE_LEARNING | 'super' object has no attribute '__sklearn_tags__' | 'super' object has no attribute '__sklearn_tags__'
I am encountering an AttributeError while fitting an XGBRegressor using RandomizedSearchCV from Scikit-learn. The error message states:
'super' object has no attribute '__sklearn_tags__'.
This occurs when I invoke the fit method on the RandomizedSearc... | https://stackoverflow.com/questions/79290968/super-object-has-no-attribute-sklearn-tags | python, machine-learning, scikit-learn, xgboost | 1,734,522,352 |
se_76598217 | stackoverflow | MACHINE_LEARNING | Picture dimension reduction | Picture dimension reduction
I need to reduce my picture dimension by means of singular value decomposition.
I've seen a lot of sources for this theme. They advise to use the following:
m, n = img.shape
U, S, V = np.linalg.svd(img)
#U.shape = m * m; S.shape = m * n; V.shape = n * n
img_cut = U[:, :x] @ np.diag(S[:x, :x... | https://stackoverflow.com/questions/76598217/picture-dimension-reduction | python, numpy, machine-learning, svd | 1,688,289,715 |
se_76613438 | stackoverflow | MACHINE_LEARNING | What is responsible for this TypeError: DataUndersampler.transform() missing 1 required positional argument: 'y'? | What is responsible for this TypeError: DataUndersampler.transform() missing 1 required positional argument: 'y'?
This is a custom support vectorbased data undersampler answer from my previous question.
The main idea is to undersample the majority class in an informed way, by fitting an SVC to the data, find t... | https://stackoverflow.com/questions/76613438/what-is-responsible-for-this-typeerror-dataundersampler-transform-missing-1-r | python, machine-learning, scikit-learn, classification | 1,688,479,384 |
se_76644106 | stackoverflow | MACHINE_LEARNING | How to resolve runtime error in CNN model related to mismatch input size? | How to resolve runtime error in CNN model related to mismatch input size?
I am trying to run a CNN model on a synthetic dataset consisting of 4000 sample of semi simple random points with 2 features and 1 cluster per class and input data size x is [4000,2] and corresponding labels size is [4000].
I understand that as ... | https://stackoverflow.com/questions/76644106/how-to-resolve-runtime-error-in-cnn-model-related-to-mismatch-input-size | machine-learning, deep-learning, pytorch, neural-network, conv-neural-network | 1,688,836,447 |
se_21703647 | stackoverflow | MACHINE_LEARNING | openCV confidence value - is it good or bad? | openCV confidence value - is it good or bad?
I'd like to use opencv face recognition with a small set of people (5 people).
Giving about 10 pictures per such person.
I'm currently testing it with Eigenfaces algorithm.
What confidence number sounds reasonable in such a case, for successful prediction?
I currently test... | https://stackoverflow.com/questions/21703647/opencv-confidence-value-is-it-good-or-bad | opencv, machine-learning, computer-vision, face-recognition | 1,392,126,420 |
se_79612729 | stackoverflow | MACHINE_LEARNING | Training and validation losses do not reduce when fine-tuning ViTPose from huggingface | Training and validation losses do not reduce when fine-tuning ViTPose from huggingface
I am trying to fine-tune a transformer/encoder based pose estimation model available here at:
https://huggingface.co/docs/transformers/en/model_doc/vitpose
When passing "labels" attribute to the forward pass of the model, the model ... | https://stackoverflow.com/questions/79612729/training-and-validation-losses-do-not-reduce-when-fine-tuning-vitpose-from-huggi | python, machine-learning, pytorch, huggingface-transformers, transformer-model | 1,746,718,134 |
se_78975293 | stackoverflow | MACHINE_LEARNING | Linear FFNN Model achieving 100% accuracy in predicting sums | Linear FFNN Model achieving 100% accuracy in predicting sums
I have a model that adds numbers between -10 to positive 10. The task is simply to predict the sum of those numbers. However the train accuracy quickly reaches 100%.
I am not sure if the model is just quickly training, or if there is something wrong and it i... | https://stackoverflow.com/questions/78975293/linear-ffnn-model-achieving-100-accuracy-in-predicting-sums | python, machine-learning, deep-learning, pytorch, perceptron | 1,726,080,228 |
se_79609919 | stackoverflow | MACHINE_LEARNING | How to make NN really find optimal solution during training? | How to make NN really find optimal solution during training?
Imagine a simple problem: make a function that gets a month index as input (zero-based: 0=Jan, 1=Feb, etc) and outputs number of days in this month (leap year ignored).
Of course, using NN for that task is an overkill, but I wondered, can NN actually be trai... | https://stackoverflow.com/questions/79609919/how-to-make-nn-really-find-optimal-solution-during-training | machine-learning, deep-learning, pytorch, artificial-intelligence | 1,746,600,444 |
se_5628863 | stackoverflow | MACHINE_LEARNING | How to compare spoken audio against reference recording - language learning | How to compare spoken audio against reference recording - language learning
I am looking for a way to compare a user submitted audio recording against a reference recording for comparison in order to give someone a grade or percentage for language learning.
I realize that this is a very un-scientific way of doing thi... | https://stackoverflow.com/questions/5628863/how-to-compare-spoken-audio-against-reference-recording-language-learning | linux, audio, machine-learning, audio-processing | 1,302,565,797 |
se_38426117 | stackoverflow | MACHINE_LEARNING | Can a neural network be trained while it changes in size? | Can a neural network be trained while it changes in size?
Are there known methods of continuous training and graceful degradation of a neural net while it shrinks or grows in size (by number of nodes, connections, whatever)?
To the best of my memory, everything I've read about neural networks is from a static perspec... | https://stackoverflow.com/questions/38426117/can-a-neural-network-be-trained-while-it-changes-in-size | machine-learning, neural-network, recurrent-neural-network | 1,468,791,019 |
se_79608270 | stackoverflow | MACHINE_LEARNING | Tensorflow timeseries cant predict Sine | Tensorflow timeseries cant predict Sine
i am trying to validate a tensorflow code for simple timeseries prediction in where:
X = np.arange(0, 2000, 0.5)
y = 2 * np.sin(X) + 0.8 * np.random.rand(X.shape[0])
and the following parameters for the timeseries:
LOOK_BACK = 100
FORECAST_HORIZON = 100
any model I use or try... | https://stackoverflow.com/questions/79608270/tensorflow-timeseries-cant-predict-sine | python, tensorflow, machine-learning | 1,746,519,751 |
se_79606346 | stackoverflow | MACHINE_LEARNING | Not able to generate output on certain reviews by using fine-tune model | Not able to generate output on certain reviews by using fine-tune model
I'm using T5, a text-to-text model for performing spell checks in a given dataset consisting of reviews. The model is fine-tuned in 2 iterations of 20k reviews and 40k reviews each. The training loss and validation loss in this entire process were... | https://stackoverflow.com/questions/79606346/not-able-to-generate-output-on-certain-reviews-by-using-fine-tune-model | python, machine-learning, nlp, huggingface-transformers | 1,746,421,522 |
se_65003877 | stackoverflow | MACHINE_LEARNING | Understanding `leafsize` in scipy.spatial.KDTree | Understanding `leafsize` in scipy.spatial.KDTree
Problem statement:
I have 150k points in a 3D space with their coordinates stored in a matrix with dimension [150k, 3] in mm.
I want to find all the neighbors of a given point p that are within a radius r. And I want to do that in the most accurate way.
How should I cho... | https://stackoverflow.com/questions/65003877/understanding-leafsize-in-scipy-spatial-kdtree | machine-learning, scipy, tree, nearest-neighbor, kdtree | 1,606,304,091 |
se_79600456 | stackoverflow | MACHINE_LEARNING | what is the best way to scale a dataset, scaling the entire dataset to get the it as numpy array or to scale it column by column? | what is the best way to scale a dataset, scaling the entire dataset to get the it as numpy array or to scale it column by column?
Which one of the following 2 methods is preferred?
To scale the entire dataset to make it into numpy array
To scale the dataset row by row in such a way that you get dataframe back but thi... | https://stackoverflow.com/questions/79600456/what-is-the-best-way-to-scale-a-dataset-scaling-the-entire-dataset-to-get-the-i | machine-learning | 1,746,021,175 |
se_79598098 | stackoverflow | MACHINE_LEARNING | Why is this python code not running under first execution? | Why is this python code not running under first execution?
from transformers import pipeline
summarizer = pipeline("summarization")
result = summarizer(
"""
America has changed dramatically during recent years. Not only has the number of
graduates in traditional engineering disciplines such as mechanical... | https://stackoverflow.com/questions/79598098/why-is-this-python-code-not-running-under-first-execution | machine-learning, nlp, artificial-intelligence, huggingface-transformers, large-language-model | 1,745,921,042 |
se_52234531 | stackoverflow | MACHINE_LEARNING | How to to predict the model using linear regression? | How to to predict the model using linear regression?
I'm trying to predict the housing price for this dataset
I'm trying to use Linear regression model, I'm getting value error as
ValueError: could not convert string to float: as shown below
import numpy as np
import pandas as pd
from sklearn.linear_model import L... | https://stackoverflow.com/questions/52234531/how-to-to-predict-the-model-using-linear-regression | python, pandas, dataframe, machine-learning, linear-regression | 1,536,403,598 |
se_79604798 | stackoverflow | MACHINE_LEARNING | How does the Tensorflow Gradient Tape calculation work at a low level? | How does the Tensorflow Gradient Tape calculation work at a low level?
I have just seen some code which has sparked my interest.
with tf.GradientTape() as g:
y = f(x)
dy_dx = g.gradient(y, x)
(Code loosely taken from this reference.)
There are two things which I think are interesting about this:
The use of a co... | https://stackoverflow.com/questions/79604798/how-does-the-tensorflow-gradient-tape-calculation-work-at-a-low-level | python, tensorflow, machine-learning, neural-network | 1,746,282,325 |
se_79604724 | stackoverflow | MACHINE_LEARNING | RandomForest Classifier Takes Forever | RandomForest Classifier Takes Forever
I am working on a data science project and trying to find the optimal parameters for my project
this is what I want to test but it takes forever and I could not see the output since its been 1 hour.
scores =[]
for k in range(1, 200):
rfc = RandomForestClassifier(n_estimators=k... | https://stackoverflow.com/questions/79604724/randomforest-classifier-takes-forever | python, machine-learning, random-forest | 1,746,277,239 |
se_78527569 | stackoverflow | MACHINE_LEARNING | How to save and load TensorFlow Decision forest model for incremental learning? | How to save and load TensorFlow Decision forest model for incremental learning?
I am developing TensorFlow decision forest regression model for incremental learning, So I have developed the model and have saved the model. When I retrain with new data the error is coming like "ValueError: The model's task attribute (CL... | https://stackoverflow.com/questions/78527569/how-to-save-and-load-tensorflow-decision-forest-model-for-incremental-learning | python, pandas, machine-learning, keras, tensorflow-decision-forests | 1,716,542,020 |
se_79601928 | stackoverflow | MACHINE_LEARNING | do i need to scale the rf model while creating voting ensemble model? | do i need to scale the rf model while creating voting ensemble model?
I'm building a classification model for sleep disorders using Voting Ensemble and I have three base models: Logistic Regression, Random Forest and SVM.
Now I want to combine these models using a Voting Ensemble with soft voting.I don't really have a... | https://stackoverflow.com/questions/79601928/do-i-need-to-scale-the-rf-model-while-creating-voting-ensemble-model | python, machine-learning, scikit-learn, random-forest, ensemble-learning | 1,746,105,731 |
se_79603047 | stackoverflow | MACHINE_LEARNING | ray.tune: Tracked actor is not managed | ray.tune: Tracked actor is not managed
from ray import tune
from ray.tune.search.optuna import OptunaSearch
from ray.tune.integration.pytorch_lightning import TuneReportCheckpointCallback
from pytorch_lightning import Trainer
from pytorch_lightning.callbacks import EarlyStopping
from data_module import D... | https://stackoverflow.com/questions/79603047/ray-tune-tracked-actor-is-not-managed | python, machine-learning, deep-learning, neural-network, ray | 1,746,175,215 |
se_79602705 | stackoverflow | MACHINE_LEARNING | Why is DecisionTree using same feature and same condition twice | Why is DecisionTree using same feature and same condition twice
When trying to fit scikit-learn DecisionTreeClassifier on my data, I am observing some weird behavior.
x[54] (a boolan feature) is used to break the 19 samples into 2 and 17 on top left node. Then again, the same feature with exact same condition appears ... | https://stackoverflow.com/questions/79602705/why-is-decisiontree-using-same-feature-and-same-condition-twice | python, machine-learning, scikit-learn, classification, decision-tree | 1,746,148,450 |
se_79602447 | stackoverflow | MACHINE_LEARNING | Create a new version of the train set for each fold of cross validation | Create a new version of the train set for each fold of cross validation
I have a clinical dataset in which there are repeated daily measurements for each patient (eg. 600 patients x 10 daily measurements/patient = 6000 patient days/rows).
I am trying to train ML models to predict one of the continuous variables in the... | https://stackoverflow.com/questions/79602447/create-a-new-version-of-the-train-set-for-each-fold-of-cross-validation | r, machine-learning, cross-validation, r-caret | 1,746,128,911 |
se_37246044 | stackoverflow | MACHINE_LEARNING | Is it possible to program from shell (vim + tmux) and host an ipython server for the matplitlib graphs? | Is it possible to program from shell (vim + tmux) and host an ipython server for the matplitlib graphs?
I currently host an ipython (or jupyter) notebook on an AWS server. I write my programs and get the outputs (matplotlib graphs) from the notebook, but I find it quite uncomfortable. The graphs are great, but I'd muc... | https://stackoverflow.com/questions/37246044/is-it-possible-to-program-from-shell-vim-tmux-and-host-an-ipython-server-for | python, machine-learning, ipython | 1,463,367,142 |
se_79344565 | stackoverflow | MACHINE_LEARNING | Using `bitsandbytes` 4-bit quantization requires the latest version of bitsandbytes: `pip install -U bitsandbytes` | Using `bitsandbytes` 4-bit quantization requires the latest version of bitsandbytes: `pip install -U bitsandbytes`
While loading the tokenizer, I received this error:
ImportError: Using bitsandbytes 4-bit quantization requires the latest version of bitsandbytes:
pip install -U bitsandbytes.
I am using Jupyter notebo... | https://stackoverflow.com/questions/79344565/using-bitsandbytes-4-bit-quantization-requires-the-latest-version-of-bitsandby | python, machine-learning, huggingface-transformers, large-language-model, fine-tuning | 1,736,481,161 |
se_79594764 | stackoverflow | MACHINE_LEARNING | Increasing the size of the model | Increasing the size of the model
Recently I trained two MLP model and saved weights for future work. I develop one module for loading model and use these model in another module.
Load model module contain this code to load models:
def creat_model_extractor(model_path, feature_count):
"""
This function create m... | https://stackoverflow.com/questions/79594764/increasing-the-size-of-the-model | python, tensorflow, machine-learning | 1,745,736,646 |
se_74832665 | stackoverflow | MACHINE_LEARNING | Transfer Learning for Vanilla Neural Network | Transfer Learning for Vanilla Neural Network
Is it possible to do transfer learning for vanilla neural network?
I meant vanilla neural network as classic classification prediction such as whether the transaction is a fraud, the employee may quit the job, etc.
I have a trained neural network model which I would like to... | https://stackoverflow.com/questions/74832665/transfer-learning-for-vanilla-neural-network | tensorflow, machine-learning, pytorch, neural-network | 1,671,264,828 |
se_79495211 | stackoverflow | MACHINE_LEARNING | OSError when importing PyTorch: "Error loading torch_python.dll or one of its dependencies" | OSError when importing PyTorch: "Error loading torch_python.dll or one of its dependencies"
I installed PyTorch using pip install torch, but when I try to import it, I get the following error:
OSError Traceback (most recent call last)
Cell In[1], line 1
----> 1 import to... | https://stackoverflow.com/questions/79495211/oserror-when-importing-pytorch-error-loading-torch-python-dll-or-one-of-its-de | machine-learning, deep-learning, pytorch | 1,741,478,612 |
se_79595516 | stackoverflow | MACHINE_LEARNING | Stock Market Hybrid Model -LSTM & Random Forest | Stock Market Hybrid Model -LSTM & Random Forest
I am working on a market risk assessment involving a hybrid of LSTM and Random Forest. This post might seem dumb , but I am really struggling with the model right now , here are my struggles in the model :
LSTM requires huge historical dataset unlike Random Forest , ... | https://stackoverflow.com/questions/79595516/stock-market-hybrid-model-lstm-random-forest | machine-learning, lstm | 1,745,789,316 |
se_76535146 | stackoverflow | MACHINE_LEARNING | It's possible create a dataset in document ai processor and import documents via python API? | It's possible create a dataset in document ai processor and import documents via python API?
It's possible, to do the steps in the below guide, using the Python API? I saw some documentation about creating processors and training processors via Python API. But, none about creating the dataset and importing documen... | https://stackoverflow.com/questions/76535146/its-possible-create-a-dataset-in-document-ai-processor-and-import-documents-via | machine-learning, nlp, cloud-document-ai | 1,687,462,619 |
se_79595922 | stackoverflow | MACHINE_LEARNING | Fine-tuning a model with the Trainer API | TypeError: object of type 'NoneType' has no len() | Fine-tuning a model with the Trainer API | TypeError: object of type 'NoneType' has no len()
I am using hugging face Trainer API.
transformers version==4.31.0
torch==2.0.1
accelerate==0.27.0
I'm trying to fine-tune a TimeSformer model for video classification using the Hugging Face Transformers library. When I... | https://stackoverflow.com/questions/79595922/fine-tuning-a-model-with-the-trainer-api-typeerror-object-of-type-nonetype | python, machine-learning, pytorch, huggingface-transformers, huggingface-trainer | 1,745,822,620 |
se_76633836 | stackoverflow | MACHINE_LEARNING | What does langchain CharacterTextSplitter's chunk_size param even do? | What does langchain CharacterTextSplitter's chunk_size param even do?
My default assumption was that the chunk_size parameter would set a ceiling on the size of the chunks/splits that come out of the split_text method, but that's clearly not right:
from langchain.text_splitter import RecursiveCharacterTextSplitter... | https://stackoverflow.com/questions/76633836/what-does-langchain-charactertextsplitters-chunk-size-param-even-do | python, machine-learning, text, nlp, langchain | 1,688,701,827 |
se_75472472 | stackoverflow | MACHINE_LEARNING | Feature Importances for categorical features after one hot encoding? | Feature Importances for categorical features after one hot encoding?
We need to encode a categorical feature with multiple categories, the resulting one-hot encoded feature will have importance scores separately for each category. If we want to combine these importances into a single feature importance for the origina... | https://stackoverflow.com/questions/75472472/feature-importances-for-categorical-features-after-one-hot-encoding | machine-learning, scikit-learn, feature-selection | 1,676,551,445 |
se_48374391 | stackoverflow | MACHINE_LEARNING | feature selection and categorical variables encoding | feature selection and categorical variables encoding
In which order should we apply these two steps "categorical variables encoding" and " feature selection" ? Since in case we start with the encoding, if we use one-hot encoding for instance, then we can select some of the categories only.
How can we handle this prob... | https://stackoverflow.com/questions/48374391/feature-selection-and-categorical-variables-encoding | machine-learning, feature-selection, categorical-data | 1,516,592,700 |
se_60588536 | stackoverflow | MACHINE_LEARNING | Is there any alternative to Eli5? | Is there any alternative to Eli5?
I was trying to calculate the Permutation Importance by using Eli5, however the command eli5.show_weights does not fetch any image or anything. (I tried in Python 2.7 and 3.7.)
Code snippet:
feature_names = [c for c in train_df.columns if train_df[c].dtype in [np.int64]]
X = train_df... | https://stackoverflow.com/questions/60588536/is-there-any-alternative-to-eli5 | python, machine-learning, eli5 | 1,583,678,030 |
se_68058974 | stackoverflow | MACHINE_LEARNING | How to do batch inferenece for Hugging face models? | How to do batch inferenece for Hugging face models?
I want to do batch inference on MarianMT model. Here's the code:
from transformers import MarianTokenizer
tokenizer = MarianTokenizer.from_pretrained('Helsinki-NLP/opus-mt-en-de')
src_texts = [ "I am a small frog.", "Tom asked his teacher for advice."]
tgt_texts = ["... | https://stackoverflow.com/questions/68058974/how-to-do-batch-inferenece-for-hugging-face-models | machine-learning, deep-learning, nlp, huggingface-transformers, machine-translation | 1,624,214,150 |
se_70269663 | stackoverflow | MACHINE_LEARNING | How to efficiently implement a non-fully connected Linear Layer in PyTorch? | How to efficiently implement a non-fully connected Linear Layer in PyTorch?
I made an example diagram of a scaled down version of what I'm trying to implement:
So the top two input nodes are only fully connected to the top three output nodes, and the same design applies to the bottom two nodes. So far I've come up wi... | https://stackoverflow.com/questions/70269663/how-to-efficiently-implement-a-non-fully-connected-linear-layer-in-pytorch | python, machine-learning, pytorch, sparse-matrix | 1,638,934,866 |
se_55325114 | stackoverflow | MACHINE_LEARNING | How to express Root Mean Squared Error as a percentage? | How to express Root Mean Squared Error as a percentage?
I want to compare the result of my prediction with that of another person's prediction. In the article, the author says 'The relative percentage of root mean square (RMS%) was used to evaluate the performance'. This is what I want to compare my prediction to.
C... | https://stackoverflow.com/questions/55325114/how-to-express-root-mean-squared-error-as-a-percentage | python, machine-learning, scikit-learn, mean-square-error | 1,553,439,602 |
se_77792137 | stackoverflow | MACHINE_LEARNING | How to fix the learning-rate for Huggingface´s Trainer? | How to fix the learning-rate for Huggingface´s Trainer?
I'm training model with the following parameters:
Seq2SeqTrainingArguments(
output_dir = "./out",
overwrite_output_dir = True,
do_train = True,
do_eval = True,
per_d... | https://stackoverflow.com/questions/77792137/how-to-fix-the-learning-rate-for-huggingface%c2%b4s-trainer | machine-learning, deep-learning, huggingface-transformers, huggingface-trainer, learning-rate | 1,704,878,066 |
se_79591839 | stackoverflow | MACHINE_LEARNING | Trained model has "training_args.bin" along with other essentials but I don't see "pytorch_model.bin" | Trained model has "training_args.bin" along with other essentials but I don't see "pytorch_model.bin"
I'm training a model, and the output includes training_args.bin along with other essential files. However, I don't see a pytorch_model.bin file. From what I've read and gathered through GPT, th... | https://stackoverflow.com/questions/79591839/trained-model-has-training-args-bin-along-with-other-essentials-but-i-dont-se | python, machine-learning, artificial-intelligence, huggingface-transformers | 1,745,557,408 |
se_79592544 | stackoverflow | MACHINE_LEARNING | Tensorflow - Trained model always wrong, on image it trained on | Tensorflow - Trained model always wrong, on image it trained on
I'm currently learning Tensorflow.
And the best way to do so is to get hands dirty right.
As an exercise Im training a model with some pokemon data found on kaggle.
After the model has been created and I check it with one of the pictures, that trained it,... | https://stackoverflow.com/questions/79592544/tensorflow-trained-model-always-wrong-on-image-it-trained-on | python, tensorflow, machine-learning, model | 1,745,585,145 |
se_69168112 | stackoverflow | MACHINE_LEARNING | Post processing output of Palm detector model from MediaPipe | Post processing output of Palm detector model from MediaPipe
I'm trying to use the tflite hand models from:
https://drive.google.com/file/d/1yiPfkhb4hSbXJZaSq9vDmhz24XVZmxpL/preview
I'm having trouble post processing the outputs of the palm detection model to get the bounding box for the palm in an input image.
""
Pal... | https://stackoverflow.com/questions/69168112/post-processing-output-of-palm-detector-model-from-mediapipe | tensorflow, machine-learning, computer-vision, tensorflow-lite, inference | 1,631,561,270 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.