Commit 55686c73 authored by Andrei-Claudiu Roibu's avatar Andrei-Claudiu Roibu 🖥
Browse files

added labels generator function

parent dc68be2b
...@@ -19,6 +19,7 @@ import shutil ...@@ -19,6 +19,7 @@ import shutil
import logging import logging
import numpy as np import numpy as np
import re import re
from textwrap import wrap
# The SummaryWriter class provides a high-level API to create an event file in a given directory and add summaries and events to it. # The SummaryWriter class provides a high-level API to create an event file in a given directory and add summaries and events to it.
# More here: https://tensorboardx.readthedocs.io/en/latest/tensorboard.html # More here: https://tensorboardx.readthedocs.io/en/latest/tensorboard.html
...@@ -92,8 +93,16 @@ class LogWriter(): ...@@ -92,8 +93,16 @@ class LogWriter():
Raises: Raises:
None None
""" """
return pass label_classes = []
for label in labels:
label_class = re.sub(r'([a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))', r'\1 ', label)
label_class = ['\n'.join(wrap(element, 40)) for element in label_class]
label_classes.append(label_class)
return label_classes
def log(self, message): def log(self, message):
"""Log function """Log function
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment