ValueError: shapes (240000,28,28) and (2,512) not aligned: 28 (dim 2) != 2 (dim 0)

I’m making a CNN and I’ve got this error that the matrices don’t align and i understand the error but i don’t know how to fix it. Here is the code: import numpy as np import nnfs import emnist import …

SVM working well on test subset fails on whole dataset

I trained a SVM iterativly on large chunks of data using sklearn. Each csv file is a part of an image. I made those with a sliding window aproach. I used partial_fit() for fitting the SVM as well as …

Training on multiple data sets with scikit.mlpregressor

I’m currently training my first neural network on a larger dataset. I have splitted my training data to several .npy binary files, that each contain batches of 20k training samples. I’m loading the …

how to convert generated data into pandas dataframe

from sklearn.datasets import make_classification df = make_classification(n_samples=10000, n_features=9, n_classes=1, random_state = 18, class_sep=2, …

How can I convert columns of string in dataset to int?

Some of the data in the dataset are in string format and I should map all of them to the numeric form. I want to convert string data in some columns in the dataset to int int to become usable in the …

multi-threading, what is wrong with my code

I was trying to make faster my frames in opencv, it was so slow using it normal, so I decided to ask it here Make faster videocapture opencv the answer was to use multi threading to make it faster, so …

How to add two separate layers on the top of one layer using pytorch?

I want to add two separate layers on the top of one layer (or a pre-trained model) Is that possible for me to do using Pytorch?

Traing a CNN using Prelu activation function

I’m trying to train the model using prelu activation function, but I get the following error ————————————————————————— ValueError …

How to find the regression line for multiple independent variables?

I’m trying to understand how the Multiple Line Regression works in code for machine learning. The issue I’m having is that I don’t get how to set up my regression line properly or if my coefficients …

How to plot the accuracy and and loss from this Keras CNN model?

The code below is for my CNN model and I want to plot the accuracy and loss for it, any help would be much appreciated. I want the output to be plotted using matplotlib so need any advice as Im not …