Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 725 Bytes

README.md

File metadata and controls

29 lines (22 loc) · 725 Bytes

teebee

$ pip install teebee
from teebee import Teebee

# Initialize a Teebee object with the per-epoch length (same with the
# length of the loader) and the path where TensorBoard logs will be stored.
tb = Teebee(len(loader), '/tmp/tb/run-20190219')

for epoch in range(1000):
    # Let tb follow the current epoch.
    tb.epoch(epoch)

    # Report at the exact epoch.
    tb.scalar('lr', lr)

    for step, batch in enumerate(loader):
        ...

        # Let tb follow the current in-epoch step. It will return True
        # if logs should be reported at this step.
        if tb.step(step):
            # Calculate data to report in this block.
            tb.scalar('loss', loss.item())