Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
Show whitespace changes
Inline
Side-by-side
bob/learn/tensorflow/dataset/bio.py
View file @
f83a7087
...
@@ -56,8 +56,6 @@ class BioGenerator(object):
...
@@ -56,8 +56,6 @@ class BioGenerator(object):
def
biofile_to_label
(
biofile
):
def
biofile_to_label
(
biofile
):
return
-
1
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
.
database
=
database
self
.
biofiles
=
biofiles
self
.
biofiles
=
biofiles
self
.
load_data
=
load_data
self
.
load_data
=
load_data
...
@@ -83,6 +81,16 @@ class BioGenerator(object):
...
@@ -83,6 +81,16 @@ class BioGenerator(object):
"and %s shapes"
,
len
(
self
.
biofiles
),
self
.
output_types
,
"and %s shapes"
,
len
(
self
.
biofiles
),
self
.
output_types
,
self
.
output_shapes
)
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
@
property
def
output_types
(
self
):
def
output_types
(
self
):
return
self
.
_output_types
return
self
.
_output_types
...
...
Write
Preview
Markdown
is supported
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