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

Function _run_step

tensorlayer/utils.py:675–683  ·  view source on GitHub ↗

Run for one step

(network, X_batch, y_batch, cost=None, acc=None)

Source from the content-addressed store, hash-verified

673
674# @tf.function # FIXME : enable tf.function will cause some bugs in numpy, need fixing
675def _run_step(network, X_batch, y_batch, cost=None, acc=None):
676 """Run for one step"""
677 y_pred = network(X_batch)
678 _loss, _acc = None, None
679 if cost is not None:
680 _loss = cost(y_pred, y_batch)
681 if acc is not None:
682 _acc = acc(y_pred, y_batch)
683 return _loss, _acc

Callers 1

run_epochFunction · 0.85

Calls 1

accFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…