Returns all events in the single eventfile in logdir. Args: logdir: The directory in which the single event file is sought. Returns: A list of all tf.Event protos from the single event file. Raises: AssertionError: If logdir does not contain exactly one file.
(logdir)
| 1219 | |
| 1220 | |
| 1221 | def events_from_logdir(logdir): |
| 1222 | """Returns all events in the single eventfile in logdir. |
| 1223 | |
| 1224 | Args: |
| 1225 | logdir: The directory in which the single event file is sought. |
| 1226 | |
| 1227 | Returns: |
| 1228 | A list of all tf.Event protos from the single event file. |
| 1229 | |
| 1230 | Raises: |
| 1231 | AssertionError: If logdir does not contain exactly one file. |
| 1232 | """ |
| 1233 | assert gfile.Exists(logdir) |
| 1234 | files = gfile.ListDirectory(logdir) |
| 1235 | assert len(files) == 1, 'Found not exactly one file in logdir: %s' % files |
| 1236 | return events_from_file(os.path.join(logdir, files[0])) |
| 1237 | |
| 1238 | |
| 1239 | def to_numpy(summary_value): |
no test coverage detected