I encountered an error when using "keras.callbacks.TensorBoard(logdir)"
windows 10
tensorflow-gpu==2.0.0
*The following error message :
ProfilerNotRunningError Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in on_start(self, model, callbacks, use_samples, verbose, mode)
667 try:
--> 668 yield
669 finally:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, **kwargs)
323 training_context=training_context,
--> 324 total_epochs=epochs)
325 cbks.make_logs(model, epoch_logs, training_result, ModeKeys.TRAIN)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in run_one_epoch(model, iterator, execution_function, dataset_size, batch_size, strategy, steps_per_epoch, num_samples, mode, training_context, total_epochs)
173 cbks.make_logs(model, batch_logs, batch_outs, mode)
--> 174 step += 1
175
C:\ProgramData\Anaconda3\lib\contextlib.py in __exit__(self, type, value, traceback)
87 try:
---> 88 next(self.gen)
89 except StopIteration:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in on_batch(self, step, mode, size)
699 self.callbacks._call_batch_hook(
--> 700 mode, 'end', step, batch_logs)
701 self.progbar.on_batch_end(step, batch_logs)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in _call_batch_hook(self, mode, hook, batch, logs)
234 batch_hook = getattr(callback, hook_name)
--> 235 batch_hook(batch, logs)
236 self._delta_ts[hook_name].append(time.time() - t_before_callbacks)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in on_train_batch_end(self, batch, logs)
517 # For backwards compatibility.
--> 518 self.on_batch_end(batch, logs=logs)
519
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in on_batch_end(self, batch, logs)
1602 if self._is_tracing:
-> 1603 self._log_trace()
1604 elif (not self._is_tracing and
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in _log_trace(self)
1636 step=self._total_batches_seen,
-> 1637 profiler_outdir=os.path.join(self.log_dir, 'train'))
1638 self._is_tracing = False
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\ops\summary_ops_v2.py in trace_export(name, step, profiler_outdir)
1217 if profiler:
-> 1218 _profiler.save(profiler_outdir, _profiler.stop())
1219
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\profiler.py in stop()
97 raise ProfilerNotRunningError(
---> 98 'Cannot stop profiling. No profiler is running.')
99 if context.default_execution_mode == context.EAGER_MODE:
ProfilerNotRunningError: Cannot stop profiling. No profiler is running.
During handling of the above exception, another exception occurred:
ProfilerNotRunningError Traceback (most recent call last)
27 history = model.fit(x_train_scaled, y_train, epochs=10,
28 validation_data=(x_valid_scaled, y_valid),
---> 29 callbacks = callbacks)
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
726 max_queue_size=max_queue_size,
727 workers=workers,
--> 728 use_multiprocessing=use_multiprocessing)
729
730 def evaluate(self,
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, **kwargs)
370 total_epochs=1)
371 cbks.make_logs(model, epoch_logs, eval_result, ModeKeys.TEST,
--> 372 prefix='val_')
373
374 return model.history
C:\ProgramData\Anaconda3\lib\contextlib.py in __exit__(self, type, value, traceback)
97 value = type()
98 try:
---> 99 self.gen.throw(type, value, traceback)
100 except StopIteration as exc:
101 # Suppress StopIteration unless it's the same exception that
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in on_start(self, model, callbacks, use_samples, verbose, mode)
669 finally:
670 # End of all epochs
--> 671 self.callbacks._call_end_hook(mode)
672
673 @tf_contextlib.contextmanager
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in _call_end_hook(self, mode)
256 """Helper function for on_{train|test|predict}_end methods."""
257 if mode == ModeKeys.TRAIN:
--> 258 self.on_train_end()
259 elif mode == ModeKeys.TEST:
260 self.on_test_end()
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in on_train_end(self, logs)
373 """
374 for callback in self.callbacks:
--> 375 callback.on_train_end(logs)
376
377 def on_test_begin(self, logs=None):
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in on_train_end(self, logs)
1619 def on_train_end(self, logs=None):
1620 if self._is_tracing:
-> 1621 self._log_trace()
1622 self._close_writers()
1623
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\callbacks.py in _log_trace(self)
1635 name='batch_%d' % self._total_batches_seen,
1636 step=self._total_batches_seen,
-> 1637 profiler_outdir=os.path.join(self.log_dir, 'train'))
1638 self._is_tracing = False
1639
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\ops\summary_ops_v2.py in trace_export(name, step, profiler_outdir)
1216
1217 if profiler:
-> 1218 _profiler.save(profiler_outdir, _profiler.stop())
1219
1220 trace_off()
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\profiler.py in stop()
96 if _profiler is None:
97 raise ProfilerNotRunningError(
---> 98 'Cannot stop profiling. No profiler is running.')
99 if context.default_execution_mode == context.EAGER_MODE:
100 context.async_wait()
ProfilerNotRunningError: Cannot stop profiling. No profiler is running.
In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here. Thanks!
@shliang0603 Are you encountering this issue on Windows?
@rmothukuru @gowthamkpr
It's my code :
logdir = './cnn_selu_callbacks'
if not os.path.exists(logdir):
os.mkdir(logdir)
output_model_file = os.path.join(logdir,
"fashion_mnist_model.h5")
callbacks = [
keras.callbacks.TensorBoard(log_dir=logdir),
keras.callbacks.ModelCheckpoint(output_model_file,
save_best_only = True),
keras.callbacks.EarlyStopping(patience=5, min_delta=1e-3),
]
history = model.fit(x_train_scaled, y_train, epochs=10,
validation_data=(x_valid_scaled, y_valid),
callbacks = callbacks)
I'm sure running code on windows platform!
I have just had a similar issue (same error), i recalled that that i read somewhere there is an issue reading or accessing file paths on windows i think.
Try changing
logdir = './cnn_selu_callbacks'
to
logdir = os.join.path('cnn_selu_callbacks')
And passing logdir to keras.callbacks.TensorBoard(log_dir=logdir), as in my case this was line that was the issue.
I'm not sure how this will effect the output_model_file in your code though.
My code is this:
history=model.fit([x_tr,y_tr[:,:-1]], y_tr.reshape(y_tr.shape[0],y_tr.shape[1], 1)[:,1:] ,epochs=50,callbacks=[es],batch_size=128, validation_data=([x_val,y_val[:,:-1]], y_val.reshape(y_val.shape[0],y_val.shape[1], 1)[:,1:]))
and I am getting an error as:
Train on 15594 samples, validate on 1726 samples
Epoch 1/50
val_loss which is not available. Available metrics are: TypeError Traceback (most recent call last)
----> 1 history=model.fit([x_tr,y_tr[:,:-1]], y_tr.reshape(y_tr.shape[0],y_tr.shape[1], 1)[:,1:] ,epochs=50,callbacks=[es],batch_size=128, validation_data=([x_val,y_val[:,:-1]], y_val.reshape(y_val.shape[0],y_val.shape[1], 1)[:,1:]))
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training.py in fit(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, max_queue_size, workers, use_multiprocessing, **kwargs)
726 max_queue_size=max_queue_size,
727 workers=workers,
--> 728 use_multiprocessing=use_multiprocessing)
729
730 def evaluate(self,
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in fit(self, model, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, validation_freq, **kwargs)
322 mode=ModeKeys.TRAIN,
323 training_context=training_context,
--> 324 total_epochs=epochs)
325 cbks.make_logs(model, epoch_logs, training_result, ModeKeys.TRAIN)
326
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py in run_one_epoch(model, iterator, execution_function, dataset_size, batch_size, strategy, steps_per_epoch, num_samples, mode, training_context, total_epochs)
121 step=step, mode=mode, size=current_batch_size) as batch_logs:
122 try:
--> 123 batch_outs = execution_function(iterator)
124 except (StopIteration, errors.OutOfRangeError):
125 # TODO(kaftan): File bug about tf function and errors.OutOfRangeError?
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py in execution_function(input_fn)
84 # numpy translates Tensors to values in Eager mode.
85 return nest.map_structure(_non_none_constant_value,
---> 86 distributed_function(input_fn))
87
88 return execution_function
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\def_function.py in __call__(self, args, *kwds)
455
456 tracing_count = self._get_tracing_count()
--> 457 result = self._call(args, *kwds)
458 if tracing_count == self._get_tracing_count():
459 self._call_counter.called_without_tracing()
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\def_function.py in _call(self, args, *kwds)
492 # In this case we have not created variables on the first call. So we can
493 # run the first trace but we should fail if variables are created.
--> 494 results = self._stateful_fn(args, *kwds)
495 if self._created_variables:
496 raise ValueError("Creating variables on a non-first call to a function"
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\function.py in __call__(self, args, *kwargs)
1820 def __call__(self, args, *kwargs):
1821 """Calls a graph function specialized to the inputs."""
-> 1822 graph_function, args, kwargs = self._maybe_define_function(args, kwargs)
1823 return graph_function._filtered_call(args, kwargs) # pylint: disable=protected-access
1824
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\function.py in _maybe_define_function(self, args, kwargs)
2148 graph_function = self._function_cache.primary.get(cache_key, None)
2149 if graph_function is None:
-> 2150 graph_function = self._create_graph_function(args, kwargs)
2151 self._function_cache.primary[cache_key] = graph_function
2152 return graph_function, args, kwargs
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes)
2039 arg_names=arg_names,
2040 override_flat_arg_shapes=override_flat_arg_shapes,
-> 2041 capture_by_value=self._capture_by_value),
2042 self._function_attributes,
2043 # Tell the ConcreteFunction to clean up its graph once it goes out of
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\framework\func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes)
913 converted_func)
914
--> 915 func_outputs = python_func(func_args, *func_kwargs)
916
917 # invariant: func_outputs contains only Tensors, CompositeTensors,
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\eager\def_function.py in wrapped_fn(args, *kwds)
356 # __wrapped__ allows AutoGraph to swap in a converted function. We give
357 # the function a weak reference to itself to avoid a reference cycle.
--> 358 return weak_wrapped_fn().__wrapped__(args, *kwds)
359 weak_wrapped_fn = weakref.ref(wrapped_fn)
360
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py in distributed_function(input_iterator)
71 strategy = distribution_strategy_context.get_strategy()
72 outputs = strategy.experimental_run_v2(
---> 73 per_replica_function, args=(model, x, y, sample_weights))
74 # Out of PerReplica outputs reduce or pick values to return.
75 all_outputs = dist_utils.unwrap_output_dict(
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\distribute\distribute_lib.py in experimental_run_v2(self, fn, args, kwargs)
758 fn = autograph.tf_convert(fn, ag_ctx.control_status_ctx(),
759 convert_by_default=False)
--> 760 return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
761
762 def reduce(self, reduce_op, value, axis):
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\distribute\distribute_lib.py in call_for_each_replica(self, fn, args, kwargs)
1785 kwargs = {}
1786 with self._container_strategy().scope():
-> 1787 return self._call_for_each_replica(fn, args, kwargs)
1788
1789 def _call_for_each_replica(self, fn, args, kwargs):
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\distribute\distribute_lib.py in _call_for_each_replica(self, fn, args, kwargs)
2130 self._container_strategy(),
2131 replica_id_in_sync_group=constant_op.constant(0, dtypes.int32)):
-> 2132 return fn(args, *kwargs)
2133
2134 def _reduce_to(self, reduce_op, value, destinations):
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\pythonautograph\implapi.py in wrapper(args, *kwargs)
290 def wrapper(args, *kwargs):
291 with ag_ctx.ControlStatusCtx(status=ag_ctx.Status.DISABLED):
--> 292 return func(args, *kwargs)
293
294 if inspect.isfunction(func) or inspect.ismethod(func):
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_v2_utils.py in train_on_batch(model, x, y, sample_weight, class_weight, reset_metrics)
262 y,
263 sample_weights=sample_weights,
--> 264 output_loss_metrics=model._output_loss_metrics)
265
266 if reset_metrics:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py in train_on_batch(model, inputs, targets, sample_weights, output_loss_metrics)
309 sample_weights=sample_weights,
310 training=True,
--> 311 output_loss_metrics=output_loss_metrics))
312 if not isinstance(outs, list):
313 outs = [outs]
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py in _process_single_batch(model, inputs, targets, output_loss_metrics, sample_weights, training)
250 output_loss_metrics=output_loss_metrics,
251 sample_weights=sample_weights,
--> 252 training=training))
253 if total_loss is None:
254 raise ValueError('The model cannot be run '
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\training_eager.py in _model_loss(model, inputs, targets, output_loss_metrics, sample_weights, training)
125 inputs = nest.map_structure(ops.convert_to_tensor, inputs)
126
--> 127 outs = model(inputs, **kwargs)
128 outs = nest.flatten(outs)
129
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py in __call__(self, inputs, args, *kwargs)
845 outputs = base_layer_utils.mark_as_return(outputs, acd)
846 else:
--> 847 outputs = call_fn(cast_inputs, args, *kwargs)
848
849 except errors.OperatorNotAllowedInGraphError as e:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\network.py in call(self, inputs, training, mask)
706 return self._run_internal_graph(
707 inputs, training=training, mask=mask,
--> 708 convert_kwargs_to_constants=base_layer_utils.call_context().saving)
709
710 def compute_output_shape(self, input_shape):
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\network.py in _run_internal_graph(self, inputs, training, mask, convert_kwargs_to_constants)
858
859 # Compute outputs.
--> 860 output_tensors = layer(computed_tensors, **kwargs)
861
862 # Update tensor_dict.
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py in __call__(self, inputs, args, *kwargs)
845 outputs = base_layer_utils.mark_as_return(outputs, acd)
846 else:
--> 847 outputs = call_fn(cast_inputs, args, *kwargs)
848
849 except errors.OperatorNotAllowedInGraphError as e:
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\pythonautograph\implapi.py in wrapper(args, *kwargs)
290 def wrapper(args, *kwargs):
291 with ag_ctx.ControlStatusCtx(status=ag_ctx.Status.DISABLED):
--> 292 return func(args, *kwargs)
293
294 if inspect.isfunction(func) or inspect.ismethod(func):
105 # e_outputs => (batch_size, de_seq_len, en_seq_len)
106 last_out, e_outputs, _ = K.rnn(
--> 107 energy_step, decoder_out_seq, [fake_state_e],
108 )
109
C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py in rnn(step_function, inputs, initial_states, go_backwards, mask, constants, unroll, input_length)
3103 input_length=input_length)
3104 reachable = tf_utils.get_reachable_from_inputs([learning_phase()],
-> 3105 targets=[last_output])
3106 if last_output in reachable:
3107 last_output._uses_learning_phase = True
C:\ProgramData\Anaconda3\lib\site-packages\tensorflow_core\python\keras\utils\tf_utils.py in get_reachable_from_inputs(inputs, targets)
132 outputs = x.consumers()
133 else:
--> 134 raise TypeError('Expected Operation, Variable, or Tensor, got ' + str(x))
135
136 for y in outputs:
TypeError: Expected Operation, Variable, or Tensor, got 1
please help me in this
I have just had a similar issue (same error), i recalled that that i read somewhere there is an issue reading or accessing file paths on windows i think.
Try changing
logdir = './cnn_selu_callbacks'to
logdir = os.join.path('cnn_selu_callbacks')
This works for me
name = "logs\\model"
Two backslashes instead of one forward slash.
Also, I'm sure it's
os.path.join and not os.join.path
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]
that's really helps me a lot, love you dude
for me, 'os.path.join' is not working.
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]
This really helps me, thanks bro
Proposed suggestions to set 'profile_batch = 100000000' work. But, the original point of was to enable profile (which is essentially disabled when you set it to 100000000)
What made it work for me with with any profile_batch was installing 2019 C++, from this link (I'm on windows 10):
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
You will need to restart your machine to have it take effect
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]
This really helps me, thanks bro!
I had similar issue. it was windows path problem.
changing './logs' to '.\\logs' solved it
os.path is kind of passing. hope tensorflow to support pathlib soon!~
People, I am having the same error. I have tried the above-mentioned suggestions but nothing works for me. Please look at my code. Maybe I have done something wrong.
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.datasets import cifar10
from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten,Conv2D, MaxPooling2D
from tensorflow.keras.callbacks import TensorBoard
import pickle
import time
NAME = "car_vc_sign-64".format(int(time.time()))
#gpu_options=tf.GPUOptions(per_process_gpu_memory_fraction=0.333)
#sess=tf.Session(config=tf.ConfigProtol(gpu_options=gpu_options))
tensorboard=TensorBoard(log_dir='logs/{}'.format(NAME))
X=pickle.load(open("X.pickle","rb"))
y=pickle.load(open("y.pickle","rb"))
X=X/255
model = Sequential()
model.add(Conv2D(64,(3,3),input_shape=X.shape[1:]))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))
model.add(Conv2D(64,(3,3)))
model.add(Activation("relu"))
model.add(MaxPooling2D(pool_size=(2,2)))
model.add(Flatten())
model.add(Dense(64))
model.add(Dense(1))
model.add(Activation('sigmoid'))
tensorboard = TensorBoard(log_dir="logs/{}".format(NAME))
model.compile(loss="binary_crossentropy",
optimizer="adam",
metrics=['accuracy'])
model.fit(X,y,
batch_size=32,
epochs=3,
validation_split=0.3,
callbacks=[tensorboard])
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]
mind explains this?
For me profile_batch=0 also works. In Tensorflow help it is said: "Set profile_batch=0 to disable profiling. Must run in TensorFlow eager mode." So maybe you need somehow to turn on eager mode to enable profiling
logdir = '.\logs'
tensorboard_callback = keras.callbacks.TensorBoard(log_dir=logdir,histogram_freq=1, profile_batch = 100000000)
model.fit(x=X_train,y=y_train,validation_data=(X_test,y_test),
callbacks=[tensorboard_callback],
epochs=30)
Its works for me on windows 10
Pls check my python notebook for complete executable code which ran on windows.
https://github.com/atulpatelDS/Deep_Learning/tree/master/ANN
logdir = '.\logs'
tensorboard_callback = keras.callbacks.TensorBoard(log_dir=logdir,histogram_freq=1, profile_batch = 100000000)Lets Train the Model
model.fit(x=X_train,y=y_train,validation_data=(X_test,y_test),
callbacks=[tensorboard_callback],
epochs=30)
Its works for me on windows 10
Pls check my python notebook for complete executable code which ran on windows.
https://github.com/atulpatelDS/Deep_Learning/tree/master/ANN
solved my error.
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]
Thank you very much. With your comment, the code can run now and doesn't pop up some error.
Most helpful comment
use the parameter profile_batch
for example:
callbacks = [tensorflow.keras.callbacks.TensorBoard(log_dir=logdir, histogram_freq=1, profile_batch = 100000000)]