Open
Description
from the advanced tutorial in Advanced Quickstart
the part of :
training_loop <- tf_function(autograph(function(train_ds, test_ds) {
for (b1 in train_ds) {
train_step(b1$x, b1$y)
}
for (b2 in test_ds) {
test_step(b2$x, b2$y)
}
tf$print("Acc", train_accuracy$result(), "Test Acc", test_accuracy$result())
train_loss$reset_states()
train_accuracy$reset_states()
test_loss$reset_states()
test_accuracy$reset_states()
}))
can we just use tf_function
with out the autograph
function based on tf_function
have argument to use autograph
see :
Lines 126 to 145 in e3791c4
and use
autograph
function only in case of executing eagerly.