MCPcopy Create free account
hub / github.com/DragonisCV/RAM / read_data_from_tensorboard

Function read_data_from_tensorboard

ram/utils/plot_util.py:4–20  ·  view source on GitHub ↗

Get raw data (steps and values) from tensorboard events. Args: log_path (str): Path to the tensorboard log. tag (str): tag to be read.

(log_path, tag)

Source from the content-addressed store, hash-verified

2
3
4def read_data_from_tensorboard(log_path, tag):
5 """Get raw data (steps and values) from tensorboard events.
6
7 Args:
8 log_path (str): Path to the tensorboard log.
9 tag (str): tag to be read.
10 """
11 from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
12
13 # tensorboard event
14 event_acc = EventAccumulator(log_path)
15 event_acc.Reload()
16 scalar_list = event_acc.Tags()['scalars']
17 print('tag list: ', scalar_list)
18 steps = [int(s.step) for s in event_acc.Scalars(tag)]
19 values = [s.value for s in event_acc.Scalars(tag)]
20 return steps, values
21
22
23def read_data_from_txt_2v(path, pattern, step_one=False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected