You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust demo scripts to be Keras 3 compatible (#6761)
This adjusts *_demo.py files to work with Keras 3.
The hparams_demo is fully backward compatible with Keras 2 and forward
compatible with Keras 3.
Unfortunately the graphs_demo is not backward compatible with Keras 2.
Users attempting to run it with Keras 2 will get the following error:
```
File "/usr/local/google/home/bdubois/.cache/bazel/_bazel_bdubois/079646a57be11faea0b2bfefccb2a81a/execroot/org_tensorflow_tensorboard/bazel-out/k8-fastbuild/bin/tensorboard/plugins/graph/graphs_demo.runfiles/org_tensorflow_tensorboard/tensorboard/plugins/graph/graphs_demo.py", line 128, in profile
tf.summary.trace_on(profiler=True, profiler_outdir=logdir)
TypeError: trace_on() got an unexpected keyword argument 'profiler_outdir'
```
Amazingly, though, the graph that the demo generates with Keras 3 can be
successfully loaded in the Graph dashboard. This makes me optimistic to
get the Graph plugin fully Keras 3 compatible after addressing the
user-reported error in #6686.
Old Keras 2 Graph:

New Keras 3 Graph:

0 commit comments