powered by
Visualizes the generated graph
view_function_graph( fn, args, ..., name = deparse(substitute(fn)), profiler = FALSE, concrete_fn = do.call(fn$get_concrete_fn, args), graph = concrete_fn$graph )
TensorFlow function (returned from tf.function())
tf.function()
arguments passed to fun
fun
other arguments passed to tensorflow::tensorboard()
tensorflow::tensorboard()
string, provided to tensorboard
logical, passed on to tf.compat.v2.summary.trace_on() (only used in eager mode)
tf.compat.v2.summary.trace_on()
a ConcreteFunction (only used in graph mode, ignored with a warning if executing eagerly)
ConcreteFunction
a tensorflow graph (only used in graph mode, ignored with a warning if executing eagerly)
# NOT RUN { fn <- tf_function(function(x) autograph(if(x > 0) x * x else x)) view_function_graph(fn, list(tf$constant(5))) # }
Run the code above in your browser using DataLab