Je suis nouveau sur Python, Machine Learning et TensorFlow et je me sens très dépassé!TensorFlow, Solution de mise en œuvre
Je travaille toujours sur l'ensemble de données MNIST et ont le code suivant (que j'ai obéis des tutoriels tensorflow):
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets('MNIST_data',one_hot=True)
import tensorflow as tf
sess = tf.InteractiveSession()
x = tf.placeholder(tf.float32, shape = [None,784])
y_ = tf.placeholder(tf.float32, shape = [None,10])
W = tf.Variable(tf.zeros([784,10]))
b = tf.Variable(tf.zeros([10]))
sess.run(tf.global_variables_initializer())
y = tf.matmul(x,W) + b
cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(y,y_))
train_step = tf.train.GradientDescentOptimizer(0.5).minimize(cross_entropy)
for i in range(10):
batch = mnist.train.next_batch(100)
train_step.run(feed_dict={x: batch[0], y_: batch[1]})
correct_prediction = tf.equal(tf.argmax(y,1), tf.argmax(y_,1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
print(accuracy.eval(feed_dict={x: mnist.test.images, y_:mnist.test.labels}))
Ma question est, d'ici, comment puis-je extraire la solution faire une application utilisable? Par quoi je veux dire, comment puis-je arriver à l'étape où je peux nourrir une image et obtenir une prédiction d'un nombre sur la base de la formation de l'ensemble de données MNIST.
Un grand merci
Dans le cas où cela est important, je cours Python 3.5 sur Windows 10 et j'ai TensorFlow version 0.12, – jlt199