How can we use MNIST dataset one class as an input using tensorflow?
Not sure exactly what you are asking. I will answer about what I understood. In case you want to predict only one class for example digit 5 and rest of the digits. Then first you need to label your vectors in such a way that maybe label all those vectors as 'one' which has ground truth 5 and 'zero' to those vectors whose ground truth is not 5. 
Then design your network with only two nodes in output, where first node will show the probability that the input vector belongs to class 'one' (or digit 5) and second node will show the probability of belonging to class 'zero'. Then just train your network. 
To find accuracy, you can simple techniques like just count how many times you predict right i.e. if probability is higher than 0.5 for right class classify it as that class. 
I hope that helps, if not maybe it would be better if you could explain your question more precisely.
I want to find the accuracy of one class in MMNIST dataset .So how can i split it on the basis of classes?