|
@ -18,10 +18,10 @@ import matplotlib.pyplot as plt |
|
|
import tensorflow as tf |
|
|
import tensorflow as tf |
|
|
|
|
|
|
|
|
class ShieldInfoCallback(DefaultCallbacks): |
|
|
class ShieldInfoCallback(DefaultCallbacks): |
|
|
def on_episode_start(self, log_dir, data) -> None: |
|
|
|
|
|
|
|
|
def on_episode_start(self) -> None: |
|
|
file_writer = tf.summary.create_file_writer(log_dir) |
|
|
file_writer = tf.summary.create_file_writer(log_dir) |
|
|
with file_writer.as_default(): |
|
|
with file_writer.as_default(): |
|
|
tf.summary.text("first_text", str(data), step=0) |
|
|
|
|
|
|
|
|
tf.summary.text("first_text", "testing", step=0) |
|
|
|
|
|
|
|
|
def on_episode_step(self) -> None: |
|
|
def on_episode_step(self) -> None: |
|
|
pass |
|
|
pass |
|
@ -92,4 +92,3 @@ class MyCallbacks(DefaultCallbacks): |
|
|
|
|
|
|
|
|
def on_evaluate_end(self, *, algorithm: Algorithm, evaluation_metrics: dict, **kwargs) -> None: |
|
|
def on_evaluate_end(self, *, algorithm: Algorithm, evaluation_metrics: dict, **kwargs) -> None: |
|
|
print("Evaluate End") |
|
|
print("Evaluate End") |
|
|
|
|
|
|