Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrei-Claudiu Roibu
BrainMapper
Commits
55686c73
Commit
55686c73
authored
Mar 30, 2020
by
Andrei-Claudiu Roibu
🖥
Browse files
added labels generator function
parent
dc68be2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/data_logging_utils.py
View file @
55686c73
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment