Digit recognition-neural-networks-using-tensorflow

python

#1

Since i am creating my own convolution neural networks for my project,it will be really useful,if someone can explain me the helper functions likes(dense_to_one_hot_encoding and batch_creator functions) in the code given in the link.

I have tried changing it,but it doesn’t work


#2

-> optimizer=tf.train.AdamOptimizer(0.05).minimize(cost)
I am getting an error for above code


ValueError Traceback (most recent call last)
in ()
----> 1 optimizer=tf.train.AdamOptimizer(0.05).minimize(cost)

C:\Users\Amit\Anaconda3\lib\site-packages\tensorflow\python\training\optimizer.py in minimize(self, loss, global_step, var_list, gate_gradients, aggregation_method, colocate_gradients_with_ops, name, grad_loss)
419 “No gradients provided for any variable, check your graph for ops”
420 " that do not support gradients, between variables %s and loss %s." %
–> 421 ([str(v) for _, v in grads_and_vars], loss))
422
423 return self.apply_gradients(grads_and_vars, global_step=global_step,

ValueError: No gradients provided for any variable, check your graph for ops that do not support gradients, between variables ["<tf.Variable ‘Variable:0’ shape=(784, 500) dtype=float32_ref>", “<tf.Variable ‘Variable_1:0’ shape=(500, 10) dtype=float32_ref>”, “<tf.Variable ‘Variable_2:0’ shape=(500,) dtype=float32_ref>”, “<tf.Variable ‘Variable_3:0’ shape=(10,) dtype=float32_ref>”] and loss Tensor(“Mean_1:0”, shape=(), dtype=float32).