Questions tagged [mnist]

MNIST is a database of handwritten digits collected by Yann Lecun and widely used in machine learning research.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
25 views

I am attempting to immplement a neural network which will recognise MNIST digits. But variables after 1st iteration take up NaN values

I am new to neural networks and this is my first project in this field. So far I didn't have many problems with is, but I am stuck on this one. The network has 2 hidden layers. After the first ...
Schreiber Ádám's user avatar
0 votes
0 answers
19 views

Binary Classification on MNIST in MatLab

How can I use the binary classifier to implement the one-vs-one and one-vs-all approach in MatLab? I have been trying to find a starting point somewhere and have struggled to find any resource to aid ...
Abhi's user avatar
  • 3
0 votes
1 answer
32 views

tensorflow fashion MNIST data set

Using the Fashion MNIST data set in Tensorflow. When building the model as below, why is the flattened layer only (28*28=724) and not 724x60000? 60000 being the number of images in the dataset? at ...
mw00847's user avatar
-1 votes
1 answer
41 views

how to remove borders in handwritten mnist data

enter image description here Like this image, I wanna remove the borders, but I dont know how to remove them,, And how can I get an image with only values of 0 and 1 to have values of 0 to 255? enter ...
kkwadk's user avatar
  • 1
0 votes
0 answers
19 views

Feedforward Neural Network learning training is extremely slow compared to tensorflow implementation

Context I'm implementing an FNN in Rust using the [nalgebra crate][1]. I implemented a vector form of the backpropagation algorithm and the RMSProp. The issue My network does not perform well on the ...
Evry's user avatar
  • 91
-1 votes
0 answers
20 views

When i run my neural network on the MNIST database, it won't train properly and guesses 2 numbers

i'm making a Neural Network to recognize the digits from the MNIST database for a school project. It is made to be as intuitive as possible so i don't use any libraries and my code is quite lengthy. ...
BareVer's user avatar
0 votes
1 answer
53 views

Solution for "Function not implemented: '. /MNIST'" in Durable functions

I would like to create a code to classify MNIST using the Durable function. I have created the following code. This code looks long, but it is mostly classes. Activity functions are not that long. ...
TY00's user avatar
  • 37
0 votes
0 answers
9 views

AI Development MNIST's numbers are all misrecognized

You have entered the code as shown below. If I write numbers on paper with my handwriting and take a picture, and put in a large image without adjusting the size of the image, it all says 8, and if I ...
love your self's user avatar
1 vote
1 answer
26 views

Boolean operation on two separate tensors to identify images misclassified in MNIST using Pytorch

Using Pytorch to evaluate a Convolutional Neural Network model for MNIST, I am trying to identify and inspect the misclassified images in my test set. I would like to see why the model had trouble ...
TennesseeTensor's user avatar
0 votes
0 answers
29 views

Why does this Keras conv2D layer give an error

I am learning using Keras for neural network applications. I have started experimenting with the mnist dataset first and have managed to make a simple NN with dense layers and get a decent result. I ...
bart's user avatar
  • 1
0 votes
0 answers
29 views

Error in Adversarial attack using fgsm :- ValueError: Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor

I am generating adversarial attack examples using FGSM on MNIST dataset. This is my fgsm_attack_generation code: def fgsm_attack(model, data, epsilon): # Retrieve the inputs and labels from the ...
Bhanu Teja Pogiri's user avatar
0 votes
0 answers
48 views

Why can this model predict the rotation of MNIST digits that accurately?

I've trained a model on the MNIST set in order to detect the rotation (0, 90, 180, 270 degrees) of the digits like so: # model / data parameters num_classes = 4 input_shape = (28, 28, 1) # load the ...
user1195883's user avatar
0 votes
0 answers
43 views

Whether there is validation data in the MNIST dataset?

When I was learning deep learning, the book whose author is Michael Nielsen, I checked its ode repository. There is a .py file named mnist_loader, the content as followed """ ...
Phi Chetham's user avatar
1 vote
1 answer
44 views

Fusion of two MNIST classification modules

I have trained two MNIST classification(final_model_0_4 and final_model_5_9) models on digit 0-4 and 5-9 respectively and both the models are giving me the expected results when I am testing them with ...
beginner's user avatar
-1 votes
1 answer
30 views

Tensor Networks for Machine Learning, mnist classification

I am dealing with a tensor network for ML task. Explicitly for classifying MNIST dataset of handwritten digits, each image consists of N = 28 × 28 = 784 pixels. But the methodology and implementation ...
Mayssa's user avatar
  • 1
1 vote
0 answers
41 views

Test Accuracy and ConfMatrix dont match up?

I'm doing the "hello world" project involving the MNSIT dataset. But by test accuracy doesn't seem to match with the diagonal of my confusion matrix. I'm not sure if I have a bug somewhere ...
Nico's user avatar
  • 11
0 votes
0 answers
43 views

How can I split and implement machine learning with Azure Durable Functions?

I am trying to implement machine learning to recognize and classify MNIST image data using Python and Durable functions. Maybe Durable functions are not suitable for machine learning, but I would like ...
TY00's user avatar
  • 37
0 votes
0 answers
12 views

Pytorch Custom Data

I am trying to build a GAN that will generate only a single digit of mnist data. I have custom data and figured out how to give custom data as input to the GAN but What should i return in len function ...
Madhava Yedla's user avatar
-1 votes
1 answer
41 views

Poor Performance with CNN Model on MNIST Dataset

I use a CNN model and I am working with the MNIST dataset. However, the model's performance is unexpectedly low - I am getting an accuracy of just 0.0664. Below is the code for my model: model = ...
Jon's user avatar
  • 11
0 votes
0 answers
31 views

AttributeError: 'generator' object has no attribute 'data' when manually loading MNIST arrf file

I cant use fetch_openml() in aws, and have to download external datasets manually. I have downloaded the mnist_784.arff file from OpenML (https://www.openml.org/search?type=data&sort=runs&id=...
Bluetail's user avatar
  • 1,147
1 vote
1 answer
64 views

Neural Network with Evolution Strategies optimizer keeps outputting the same accuracy on MNIST - Pytorch

My task is to create a ANN with an Evolution Strategies algorithm as the optimizer (no derivation). The dataset I am using is MNIST. For now, I am just trying to implement this with a Linear ANN. I ...
nico's user avatar
  • 11
1 vote
0 answers
55 views

Trying to solve MNIST problem using only numpy, but have accuracy near 10%

I traing to solve MNIST problem using only numpy but have accuracy 10% Read data and normalizing import numpy as np from sklearn.preprocessing import MinMaxScaler import pandas as pd import os import ...
Артем Бурлаченко's user avatar
0 votes
1 answer
33 views

MNIST - huge difference between validation and test score

I have a task to recognize MNIST without using NN. Accuracy should be => 0.7 I`v fit random forest and got 0.88 on validation, but test accuracy is 0.2. Such a big difference is fully unclear to me....
Vladislav's user avatar
-1 votes
1 answer
764 views

How to add heading or text before input/output in gradio?

I did a machine learning project on MNIST and deployed that on gradio. Any user won't understand what he should input to use the model. So I want to add a heading or description on gradio live website ...
Indranil Saha's user avatar
0 votes
0 answers
28 views

Splitting MNIST dataset in n subset with 2 main classes per subset with pytorch

I produced a code to split the MNIST dataset into n subsets each with 2 mains classes, and then it saves the dataset and the data répartition. (ex: subset 1 should contain 882 images of class 0, and ...
Xia 's user avatar
  • 31
0 votes
0 answers
92 views

AI Image Generator Using MNIST Only Generates 1 Image

I'm making an AI-Image Generator using Torch and MNIST. I have one script for training the model, and another for generating the image based on a prompt (100 values from -1 to 1 separated by commas). ...
Spaghetti's user avatar
0 votes
1 answer
43 views

Loading MNIST in C

I am trying to load MNIST data in C. I have created a Matrix type and want to store each image as a (28 * 28, 1) matrix. Here is my code to do so: void load_images(Matrix *target, int number, FILE *...
Someone's user avatar
  • 800
0 votes
1 answer
49 views

Error ! MNIST.npz is not UTF-8 encoded error saving disabled

When I want to load the MNIST.npz dataset with this format (mnist. npz) in Jupyter; I use from below codes to load the file but this error appeared that showed my file does not exist [...
Fardin Nourmohammadi's user avatar
-1 votes
1 answer
39 views

MNIST number guesser stuck at 9.84% accuracy

I built a MNIST dataset through watching yt tutorials. Every tutorial was using numpy but since pytorch is a newer technology I decided to build mine using pytorch. The problem is that my model is ...
josill's user avatar
  • 1
0 votes
0 answers
17 views

BackPropagation leading to same output values for each training example

Hello I am learning how to make neural networks. I am starting out with a very simple vanilla network in java that seems unable to learn. The network seems to tend towards outputting values close to ...
Daniel's user avatar
  • 1
-1 votes
1 answer
23 views

CNN model accuracy is oscillating strangely

I have a CNN that is designed to be trained on the MNIST data set using federated averaging (the model is trained locally on a number of clients for a number of local epochs on local client's data and ...
Hashitiba's user avatar
0 votes
1 answer
32 views

Changing the hyperparameters of my classifier SVM trained on a subset of the MNIST digit dataset doesn't change the accuracy at all?

I'm a beginner when it comes to machine learning and I am attempting to find hyperparameters for an SVM in order to gain 95% accuracy or better for the digit mnist dataset. The cvs file the code reads ...
Elias Kowalski's user avatar
0 votes
0 answers
58 views

how to select 5 correctly predicted images from each class

how can I select 5 correctly classified images for each class out of 10 classes so in total I want to have 50 images and send each one to another function? in the following code I was able to select ...
Sena j's user avatar
  • 25
0 votes
0 answers
34 views

'ValueError: Can not squeeze dim[1], expected a dimension of 1, got 4' in Tensorflow

I'm building a model that takes 15000x56x56 mnist images as input and distinguish the numbers. I did the 'concatenating the images' part, and now I am trying to make the target data to work for the ...
matplotlib's user avatar
0 votes
0 answers
39 views

ValueError: Data cardinality is ambiguous (TensorFlow)

I'm a first grader in computer science, and I'm trying to make a 56x56 image from 4 mnist images and make a model that can distinguish numbers in the 56x56 image. I wrote the 56x56 images part, but I ...
matplotlib's user avatar
0 votes
1 answer
20 views

i'm trying to build CNN with the one dimensional mnist dataset. i got stucked at reshapig the dateset

history = model.fit(train_datagen.flow(x_train.reshape(60000, 28, 28, 1), keras.utils.to_categorical(y_train), batch_size=32), epochs=20, validation_data=(x_test, keras.utils.to_categorical(y_test))) ...
kingsley's user avatar
0 votes
0 answers
14 views

KNN image classifier disscrepency of accuracy scores between scaled model and non-scaled one

I'm trying to build two knn image classifier with R. In first case, I scaled the data by min-max. The other one is fitted with non-scaled data. After fitting each model, I performed 4-fold cross ...
K.K.SAN's user avatar
  • 11
0 votes
0 answers
21 views

Given MNIST files (images and labels) in gz. How to read them in numpy.ndarray? [duplicate]

I have no idea what to do with the given files minst gz files. Basically, I want to be able to read them in numpy.ndarray but have no idea how. I want to try reading from the given files rather than ...
Kai's user avatar
  • 1
0 votes
1 answer
404 views

How to print a list in Google Colab without breaking lines?

I am trying to print one of the MNIST image in Google Colab without breaking lines. The problem is Colab break lines for each arrays in the list. Here is my code: from sklearn.datasets import ...
Phạm Huy Cường Thịnh's user avatar
0 votes
0 answers
37 views

After the mnist training set and the test set image are normalized, the training accuracy is extremely low

I want to classify the handwritten numbers in MNIST based on tensorflow, but after normalizing the pixels between the training set and the test set, the accuracy of the training set is extremely low! ...
hahaha's user avatar
  • 1
0 votes
0 answers
24 views

Why does the sum of params in my model different from the correct one?

Here is the requirement: Generator (5 points) For the generator, we will copy the architecture exactly from the InfoGAN paper. See Appendix C.1 MNIST. See the documentation for nn.ConvTranspose2d. We ...
HOHO's user avatar
  • 1
0 votes
0 answers
45 views

Input 0 of layer "dense" is incompatible with the layer: expected axis -1 of input shape to have value 784, but received input with shape (784, 1)

I try to train a model on the mnist dataset. Here, features and targets are two pandas Dataframe extracted from a csv file. I initiate the dataset using tensorflow: dataset = tf.data.Dataset....
Milodupipo's user avatar
0 votes
0 answers
44 views

Issues in loading MNIST dataset while running on the command prompt, Windows 10

python file execution I am trying to run a python file from my windows command prompt which uses the MNIST dataset using a machine learning algorithm. The dataset is not getting loaded when I run ...
Vishwanath Varma Indukuri's user avatar
0 votes
0 answers
26 views

mnist data set Interpolation

im working on MNIST data set using this formula :let I1 and I2 be images of two different digits,the interpolation D((E(I1)alpha)+(E(I2)(1-alpha))) for alpha [0,1] where D denotes the decoder and E ...
liza's user avatar
  • 1
0 votes
0 answers
14 views

Target Y-label ValueError: assignment destination is read-only

from keras.datasets import fashion_mnist (x_train, y_train), (x_test, y_test) = fashion_mnist.load_data() # Split the original training data into a validation set x_train, x_val, y_train, y_val = ...
Meet's user avatar
  • 29
0 votes
0 answers
22 views

convolutional AE on MNIST data set

as part of a project, i need to build a convolutional AE and explore the change in train and test lost as a function of the latent space dimentions . This is my code : import torch import torch.nn as ...
liza's user avatar
  • 1
0 votes
0 answers
233 views

Calculating SHAP values in the test step of a LightningModule network

I am trying to calculate the SHAP values within the test step of my model. The code is given below: # For setting up the dataloaders from torch.utils.data import DataLoader, Subset from torchvision ...
Raja's user avatar
  • 71
0 votes
0 answers
49 views

How to construct an imbalanced MNIST-dataset based on a pre-defined gini-coefficient?

My goal is to make different versions of the MNIST dataset with different pre-defined levels of imbalancedness. A gini-coefficient (range: 0-1) is a measure of imbalancedness of a dataset where 0 ...
J.G.A. Wijlhuizen's user avatar
0 votes
1 answer
76 views

Value Of Matrix Keep Changing Automatically After Each Iteration Of The Loop In C

/*Required Libraries*/ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include<conio.h> /* Include MNIST Dataset */ #include "mnist.h&...
Ayman Makroo's user avatar
0 votes
1 answer
215 views

Why does my Fashion MNIST CNN model classify even simple greyscale images OUTSIDE of its dataset so poorly?

I trained my Convolutional NN model using keras-tensorflow and the Fashion Mnist dataset in a pretty standard way following online tutorials. I got a training accuracy of 96% and val acc of 91%. ...
karak87rt0's user avatar

1
2 3 4 5
27