TensorBoard Keras Callback fails, if input type is tf.string
See original GitHub issueTensorBoard Version: 1.9.0 TensorFlow Version: 1.9.0 OS: macOS 10.13.6 Python Version: 2.7.10 / 3.6.4
Hi,
TensorBoard exists with the following error, if one of the input layers has the input dtype=tf.string
:
File "train.py", line 236, in train
validation_data=(X_val, y_val), callbacks=[early_stop, checkpoints, tensor_board])
File "~/venv/lib/python3.6/site-packages/keras/engine/training.py", line 1705, in fit
validation_steps=validation_steps)
File "~/venv/lib/python3.6/site-packages/keras/engine/training.py", line 1155, in _fit_loop
callbacks.set_model(callback_model)
File "~/venv/lib/python3.6/site-packages/keras/callbacks.py", line 52, in set_model
callback.set_model(model)
File "~/venv/lib/python3.6/site-packages/keras/callbacks.py", line 782, in set_model
layer.output)
File "~/venv/lib/python3.6/site-packages/tensorflow/python/summary/summary.py", line 203, in histogram
tag=tag, values=values, name=scope)
File "~/venv/lib/python3.6/site-packages/tensorflow/python/ops/gen_logging_ops.py", line 283, in histogram_summary
"HistogramSummary", tag=tag, values=values, name=name)
File "~/venv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 609, in _apply_op_helper
param_name=input_name)
File "~/venv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'values' has DataType string not in list of allowed values: float32, float64, int32, uint8, int16, int8, int64, bfloat16, uint16, float16, uint32, uint64
If I change the input of the layer to int32
TensorBoard works fine (nothing is added though), however as expected the training fails. The layer is just a simple Input layer: Input(shape=(None,), dtype=tf.string)
.
Best, Timon
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
tf.keras.callbacks.TensorBoard | TensorFlow v2.11.0
TensorBoard is a visualization tool provided with TensorFlow. This callback logs events for TensorBoard, including: Metrics summary plots; Training graph ...
Read more >How do I use the Tensorboard callback of Keras?
This line creates a Callback Tensorboard object, you should capture that object and give it to the fit function of your model. tbCallBack...
Read more >Introduction to Keras for Engineers
Keras models accept three types of inputs: NumPy arrays, just like Scikit-Learn and many other Python-based libraries. This is a good option if...
Read more >Release 2.7.0
The API endpoints for tf.keras stay unchanged, but are now backed by the keras PIP package. The existing code in tensorflow/python/keras is a...
Read more >The complete guide to ML model visualization with Tensorboard
The purpose of adding a datetime string to the directory is to ensure that ... This tutorial will focus on using callbacks to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
is there any update on this?
Could you try with the latest 2.0 nightly? I am not seeing this issue there