MCPcopy Index your code
hub / github.com/tensorlayer/TensorLayer / acc

Function acc

examples/database/task_script.py:36–38  ·  view source on GitHub ↗
(y, y_)

Source from the content-addressed store, hash-verified

34
35
36def acc(y, y_):
37 correct_prediction = tf.equal(tf.argmax(y, 1), tf.convert_to_tensor(y_, tf.int64))
38 return tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
39
40
41# define the optimizer

Callers 11

testFunction · 0.50
_train_stepFunction · 0.50
_run_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50
_train_stepFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected