I am new to using TensorFlow. So I wastrying the MNIST tutorials in ML for beginners. The code runs just fine. But what if I want to input an image of my own, which has say a handwritten number on it, and se if it predicts what number it might be? How do I feed my own image into the TensorFlow program?
Feeding image into tensorflow
471 Views Asked by Vidhi At
1
There are 1 best solutions below
Related Questions in MACHINE-LEARNING
- Trained ML model with the camera module is not giving predictions
- Keras similarity calculation. Enumerating distance between two tensors, which indicates as lists
- How to get content of BLOCK types LAYOUT_TITLE, LAYOUT_SECTION_HEADER and LAYOUT_xx in Textract
- How to predict input parameters from target parameter in a machine learning model?
- The training accuracy and the validation accuracy curves are almost parallel to each other. Is the model overfitting?
- ImportError: cannot import name 'HuggingFaceInferenceAPI' from 'llama_index.llms' (unknown location)
- Which library can replace causal_conv1d in machine learning programming?
- Fine-Tuning Large Language Model on PDFs containing Text and Images
- Sketch Guided Text to Image Generation
- My ICNN doesn't seem to work for any n_hidden
- Optuna Hyperband Algorithm Not Following Expected Model Training Scheme
- How can I resolve this error and work smoothly in deep learning?
- ModuleNotFoundError: No module named 'llama_index.node_parser'
- Difference between model.evaluate and metrics.accuracy_score
- Give Bert an input and ask him to predict. In this input, can Bert apply the first word prediction result to all subsequent predictions?
Related Questions in TENSORFLOW
- A deterministic GPU implementation of fused batch-norm backprop, when training is disabled, is not currently available
- Keras similarity calculation. Enumerating distance between two tensors, which indicates as lists
- Does tensorflow have a way of calculating input importance for simple neural networks
- How to predict input parameters from target parameter in a machine learning model?
- Windows 10 TensorFlow cannot detect Nvidia GPU
- unable to use ignore_class in SparseCategoricalCrossentropy
- Why is this code not working? I've tried everything and everything seems to be fine, but no
- Why convert jpeg into tfrecords?
- ValueError: The shape of the target variable and the shape of the target value in `variable.assign(value)` must match
- The kernel appears to have died. It will restart automatically. whenever i try to run the plt.imshow() and plt.show() function in jupyter notebook
- Pneumonia detection, using transfer learning
- Cannot install tensorflow ver 2.3.0 (distribution not found)
- AttributeError: module 'keras._tf_keras.keras.layers' has no attribute 'experimental'
- Error while loading .keras model: Layer node index out of bounds
- prediction model with python tensorflow and keras, gives error when predicting
Related Questions in MNIST
- No gradients provided for any variable in R
- Take a sample of the MNIST dataset
- Load EMNIST dataset from within the Pytorch
- Error loading the MNIST dataset in R using dataset_mnist()
- MNIST model predicts wrong on handwritten digits
- Stuck in Dimension problem in building QNN with pytorch
- NN model predicting same thing everytime
- ValueError: Expected input batch_size (210) to match target batch_size (49)
- when I change data set I receive: Layer sequential weight shape (3, 3, 1, 64) is not compatible with provided weight shape (4, 4, 3, 64)
- Neuronal Network doesnt recognize Handwritten Digits 28*28 Pixel MNIST Data set trained
- Neuronal Network digit Recognition doesnt work own hand written digits MNSIT
- The kernel for ProjectName.ipynb appears to have died. It will restart automatically
- Bug or missing thing in my MNIST number recognizer
- I am getting an error while trying to learn Tensorflow
- fashion_mnist tensor flow model doesn't work correctly after converting to tensorflow lite model
Related Questions in SOFTMAX
- pytorch softmax outputs several values
- How to replace the softmax function by an approximate softmax function inside a transformer application like NMT
- libtorch forward result unexpected
- What is causing my softmax classifier to have an extremely high loss and a validation accuracy of 1.0 in the first epoch?
- Implementing a Softmax output layer with cross-entropy loss
- Implementing a Gumbel sigmoid to restructure the data tensor
- Softmax output and probabilities not matching up?
- Can you describe how to apply SoftMax derivatives in generic terms for C++?
- Is there an efficient way of implementing sparsemax in pytorch-geometric?
- getting the error as value error , what should i do if i get this error
- How to handle softmax derivatives matrix size when performing backpropagation with neural network?
- Analyzing BERT-models -- Using raw output logits or softmax values?
- index 1 is out of bounds for axis 0 with size 1 for softmax function
- pyTorch autoencoder for unsupervised classification: loss not changing
- Why is the loss NaN
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Assuming you're using this file.
If you look at
x, the shape is[None, 784]. To feed your own image in, you'll have to store the image as a variable (loading it using PIL or OpenCV or something), flatten it, wrap it in a list, and pass it to the graph in thefeed_dict, looking something like this:It will need to be a 28x28 image in order for this code to work without modification.