Exemplo n.º 1
0
def text(writer: SummaryWriter, sample: Tuple, prefix: str, task_name: str, key: str):
    X, y = sample
    writer.add_text(f'{prefix}_{task_name}_text', X[key])
Exemplo n.º 2
0
def text_publisher(writer: SummaryWriter, tag: str, sample: Any, idx: int):
    writer.add_text(f'{tag}_text', sample, global_step=idx)