Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using tensorflow and Keras to do the object recognition based on the MNIST data

ID: 3841971 • Letter: U

Question

  Using tensorflow and Keras to do the object recognition based on the MNIST data set.   About the MNIST data set The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image.  More introduction of this data set is given below:  http://yann.lecun.com/exdb/mnist/   ###################################################################### Project part 1: Using single layer deep learning network to do the object recognition(getting the accuracy ) 
 Please submit the code, the result of your code(if the code is run from the terminal, pls send me the Screenshots of the result. If you run the code from the ipython notebook, please provide the result in your submission of the code) and a brief read me file to explain your experiment and result 
 Software requirement: python3.5 package installation: please install: numpy,tensorflow,keras,  More about how to use Keras: https://keras.io/getting-started/sequential-model-guide/ 

Explanation / Answer

import java.util.*;
class TestClass {
public static void main(String args[] ) throws Exception {
Queue<Integer> q1 = new LinkedList<Integer>();
Queue<Integer> q2 = new LinkedList<Integer>();
  
//create first sorted queue q1 of random elements
int cur =1;
for(int i=0;i<100;i++)
{
int temp = (int)(Math.random()*100);
if(temp>cur)
{
q1.add(temp);
cur=temp;
}
}
  
//create second sorted queue q2 of random elements
cur =1;
for(int i=0;i<100;i++)
{
int temp = (int)(Math.random()*100);
if(temp>cur)
{
q2.add(temp);
cur=temp;
}
}
  
System.out.println("First sorted queue = "+q1); // print q1
System.out.println("Second sorted queue = "+q2); // print q2
Queue<Integer> res = merge(q1,q2); // merge two queues
System.out.println("The merged queue = "+res); // print the resultant que
}
public static Queue<Integer> merge(Queue<Integer> q1, Queue<Integer> q2)
{
Queue<Integer> res = new LinkedList<Integer>();
while(!q1.isEmpty() && !q2.isEmpty()) // till both ques have elements
{
if(q1.peek()<q2.peek()) // compare the front elements of both ques
res.add(q1.poll()); // if front elementsin q1 is less then q2, remove front element in q1 and add it to result que
else
res.add(q2.poll()); // else remove front element of q2 and add it to result queue
}
while(!q1.isEmpty()) // if q2 is empty then add all elemnts of q1 to result
res.add(q1.poll());
  
while(!q2.isEmpty()) // if q1 is empty then add all elemnts of q1 to result
res.add(q2.poll());
  
return res; // return result queue
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote