AttributeError: 'ModifiedTensorBoard' object has no attribute '_write_logs'
C:\CarlaProject\PythonAPI\examples>python Adonia5.py Using TensorFlow backend. WARNING:tensorflow:From C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\compat\v2_compat.py:88: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version. Instructions for updating: non-resource variables are not supported in the long term WARNING:tensorflow:From C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow_core\python\ops\resource_variable_ops.py:1635: calling BaseResourceVariable.init (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers. 2020-01-13 08:39:25.890943: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 Exception in thread Thread-2: Traceback (most recent call last): File "C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\threading.py", line 917, in _bootstrap_inner self.run() File "C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\threading.py", line 865, in run self._target(*self._args, **self._kwargs) File "Adonia5.py", line 278, in train_in_loop self.model.fit(X,y, verbose=False, batch_size=1) File "C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\training.py", line 1209, in fit if self._uses_dynamic_learning_phase(): File "C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\engine\training.py", line 382, in _uses_dynamic_learning_phase not isinstance(K.learning_phase(),int)) File "C:\Users\Hp\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py", line 76, in symbolic_fn_wrapper if _SYMBOLIC_SCOPE.value: AttributeError: '_thread._local' object has no attribute 'value'
0%| | 0/100 [00:00<?, ?episodes/s]ERROR: failed to destroy actor 93 : time-out of 2000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:2000
ERROR: failed to destroy actor 94 : time-out of 2000ms while waiting for the simulator, make sure the simulator is ready and connected to localhost:2000
Traceback (most recent call last):
File "Adonia5.py", line 379, in
Did you manage to solve this error?
you can check this link https://stackoverflow.com/questions/58711624/modifying-tensorboard-in-tensorflow-2-0
@mina-parham the link is not working.
Any solution to this problem?
@hrishavraj add this code in the ModifiedTensorBoard class
# Custom method for saving own metrics
# Creates writer, writes custom metrics and closes writer
def update_stats(self, **stats):
self._write_logs(stats, self.step)
def _write_logs(self, logs, index):
with self.writer.as_default():
for name, value in logs.items():
tf.summary.scalar(name, value, step=index)
self.step += 1
self.writer.flush()
@hrishavraj add this code in the ModifiedTensorBoard class
# Custom method for saving own metrics # Creates writer, writes custom metrics and closes writer def update_stats(self, **stats): self._write_logs(stats, self.step) def _write_logs(self, logs, index): with self.writer.as_default(): for name, value in logs.items(): tf.summary.scalar(name, value, step=index) self.step += 1 self.writer.flush()
But my code is already like this