All Questions
386 questions
-4
votes
0
answers
25
views
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject tensorflowbhuissue. Using [duplicate]
I am using YAMNet petrained network. it is not working in colab. issue is ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject ...
0
votes
0
answers
68
views
Jupyter notebook kernel (on VSCode) crashes after I run sklearn's KernelPCA
I'm working on Windows WSL2 and I'm trying to make a KPCA+LDA classifier using sci-kit learn's models. I'm using SIFAR-10 and I've tried a simple KPCA and it keeps crashing the kernel.
import numpy as ...
0
votes
1
answer
46
views
How do I pass sklearns train_test_split actual dataseries and not single values as input argument?
I want to train an LSTM-based RNN model for binary classification and for that I wanted to use tensorflow keras model with LSTM layers. In order to do so, I need testing input and output as well as ...
0
votes
0
answers
61
views
Reconciling disparity between test-accuracy and confusion matrix in tensorflow
Update: it's definitely something going on with the the predict function using a custom generator. When I fetch all the test data in one batch and run predictions on it, then create a confusion matrix ...
0
votes
1
answer
55
views
Saving model hyperparameters as dictionary: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I am tuning some sklearn and tensorflow models, I get the hyperparameters as a dictionary, e.g., {'l1': 0.001, 'lr':0.001} and I save them in a larger dictionary, within my tuning function:
def ...
0
votes
1
answer
170
views
np.load fails with ValueError: cannot reshape array of size (838715,) into shape (838710,)
I'm trying to save the scaling parameters of a dataset into a .npy file on the disk, so I avoid having to recalculate them every time I re-run the code.
For now, I'm using MaxAbsScaler() from sklearn ...
1
vote
1
answer
6k
views
ValueError: The filepath provided must end in `.keras` (Keras model format). Received: filepath=model/keypoint_classifier/keypoint_classifier.hdf5
PYTHON version : 3.12.4
PIP version : 24.1.1
KERAS version : 3.4.1
TENSORFLOW version : 2.16.1
i've been trying to run a code on jupyter notebook in order to train a model:
which actually throws an ...
0
votes
0
answers
43
views
Speed up Deep Learning Inference without batching samples?
For algorithmic reasons, I would like to perform inference sequentially, sample by sample instead of performing a batched sample. It is Deep Neuronal network with the following structure:
Model: "...
0
votes
0
answers
54
views
Unable to stack trained models with scickit learn 1.4.1.post1
I have four trained models. 2 VotingClassifier models and 2 StackingClassifier models. They are already trained and saved in joblib format. I can even load them and use them for prediction (in prod, ...
1
vote
1
answer
93
views
String "loss" being passed to metric_name() instead of metric name
I'm following a tutorial, but I'm getting the error:
ValueError: Could not interpret metric identifier: loss
at:
\keras\src\metrics\__init__.py:205, in get(identifier)
It seems like in the wrapper.py ...
0
votes
0
answers
105
views
Why is my machine learning model always predicting the same wrong answer even when prediction is already in my dataset?
The goal is for my Tensorflow machine learning model to predict the Type of any Beyblade preset combination. A Beyblade preset is made up of 4 parts - Energy Ring, Fusion Wheel, Spin Track, ...
0
votes
1
answer
91
views
Problem with identical metrics results after machine learning [closed]
When trying machine learning on a dataset, I got the same results for metrics such as accuracy and F-score on different machine learning algorithms.
I have a dataset on which I trained my chosen ...
1
vote
1
answer
781
views
Can't import the lib from tensorflow
I try to import some library from tensorflow. from tensorflow.keras.models import Sequential. But the terminal said ModuleNotFoundError: No module named 'keras.wrappers'. But I found the way out is to ...
0
votes
0
answers
21
views
python code to unify the number of training smples from each category
I am using Indian Pines (IP) dataset of dimension 145x145x200 for classification problem using DL techniques. I want to train the model by taking equal number of training samples from each category. I ...
0
votes
1
answer
46
views
validation extraction using intel image classification
I'm trying to make a machine learning model that operates validation extraction to distinguish whether it's bright or dark.
I used the dataset "intel image classification" from kaggle.
...