MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / step

Function step

tensorflow/contrib/eager/python/examples/l2hmc/l2hmc_test.py:40–45  ·  view source on GitHub ↗
(dynamics, optimizer, samples)

Source from the content-addressed store, hash-verified

38
39
40def step(dynamics, optimizer, samples):
41 loss, grads, samples, _ = l2hmc.loss_and_grads(
42 dynamics, samples, loss_fn=l2hmc.compute_loss)
43 optimizer.apply_gradients(zip(grads, dynamics.variables))
44
45 return loss, samples
46
47
48# To be defunnable, the function cannot return an Operation, so the above

Callers 5

_benchmark_trainMethod · 0.50
ToStringMethod · 0.50
OutputTimelineMethod · 0.50

Calls 1

apply_gradientsMethod · 0.45

Tested by

no test coverage detected