Closed CatherineSue closed 6 years ago
The test result of the custom tensor scalar is shown in the following image. The scalar groups tensors by their name_scope.
Changed member names of class Summary
in file
rllab/misc/tensor_summary.py in order to be consistent
with the class in #58.
Rebased the repo and refactored the code in tensorboard_output.py. Sorry about the earlier messy commits.
Changes I made:
Summary
to TensorBoardOutput
._*
, majorly the dump function.Needs improvement:
There are two trig/bar:0 scalars.
Hmm okay. Investigate and let me know what you find out. Done is better than perfect :)
The custom_scalar plugin firstly writes the layout proto into a custom_scalar_config inside the run file. As a result, each run has a custom_scalar_config in its run file. When we start tensorboard at the top-level dir, it recursively finds runs within the tensorboard_dir. Thus, there will be duplicate charts, like the one above.
It seems that the original designer doesn't support the idea of each config per run (https://github.com/tensorflow/tensorboard/pull/664):
(I think per-run config files should be ignored ... what would a per-run config file mean?)
To deal with this issue, I pertain a global custom_scalar_config in the top-level dir. When there is a new run started, I merge the new run's layout proto into the global layout proto, so that there will be no duplicate fields anymore. When tensorboard starts, it only gets one custom_scalar_config.
e.g. The file inside the custom_scalar_config
contains the global custom_scalar_config.
And the tensorboard result is like this.
Great job!
Add a customized tensor scalar to tensorboard by using the custom_scalar plugin in tensorboard. Each line in the scalar corresponds to an element in the tensor.
Wrap the tensorboard logging module into a new class
Summary
in file rllab/misc/tensor_summary.py. It supports both the simple value and tensor logging. It also saves the computation graph created by rllab.To record the tensor into tensorboard, use the
record_tensor
function in file rllab/misc/logger.py.Refer to: #39, #38