Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.tensorflow
Commits
f83a7087
Commit
f83a7087
authored
Oct 30, 2017
by
Amir MOHAMMADI
Browse files
Keep regenerating labels and keys
parent
93086e0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
bob/learn/tensorflow/dataset/bio.py
View file @
f83a7087
...
...
@@ -56,8 +56,6 @@ class BioGenerator(object):
def
biofile_to_label
(
biofile
):
return
-
1
self
.
labels
=
(
biofile_to_label
(
f
)
for
f
in
biofiles
)
self
.
keys
=
(
str
(
f
.
make_path
(
""
,
""
))
for
f
in
biofiles
)
self
.
database
=
database
self
.
biofiles
=
biofiles
self
.
load_data
=
load_data
...
...
@@ -83,6 +81,16 @@ class BioGenerator(object):
"and %s shapes"
,
len
(
self
.
biofiles
),
self
.
output_types
,
self
.
output_shapes
)
@
property
def
labels
(
self
):
for
f
in
self
.
biofiles
:
yield
self
.
biofile_to_label
(
f
)
@
property
def
keys
(
self
):
for
f
in
self
.
biofiles
:
yield
str
(
f
.
make_path
(
""
,
""
)).
encode
(
'utf-8'
)
@
property
def
output_types
(
self
):
return
self
.
_output_types
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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