Closed JaledMC closed 6 years ago
I just saw that you apply this cost function to one sample each step. My fault. Sorry.
The problem is that this solution need a inner loop:
for i in range(100): for (x, y) in zip(trX, trY): sess.run(train_op, feed_dict={X: x, Y: y})
You can get rid of one loop with a matrix approach during output calculation. This is more efficient:
return tf.matmul(X, w)
Hi,
I'm not sure, but cost function should not be scaled by number of elements, to prevent Inf values with big batches?
or this:
tf.reduce_mean(tf.squared_difference(prediction, Y))