Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.tensorflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.learn.tensorflow
Commits
37c11ebd
There was a problem fetching the pipeline summary.
Commit
37c11ebd
authored
8 years ago
by
Pavel KORSHUNOV
Browse files
Options
Downloads
Patches
Plain Diff
Fixing sphinx
parent
47ae84ee
No related branches found
No related tags found
1 merge request
!6
Merge branch with audio-stuff into master
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/learn/tensorflow/datashuffler/DiskAudio.py
+9
-3
9 additions, 3 deletions
bob/learn/tensorflow/datashuffler/DiskAudio.py
with
9 additions
and
3 deletions
bob/learn/tensorflow/datashuffler/DiskAudio.py
+
9
−
3
View file @
37c11ebd
...
...
@@ -6,7 +6,8 @@
import
numpy
import
bob.core
from
.Base
import
Base
from
Queue
import
Queue
import
sys
from
scipy.io.wavfile
import
read
as
readWAV
import
time
...
...
@@ -16,6 +17,11 @@ import logging
logger
=
logging
.
getLogger
(
"
bob.learn.tensorflow
"
)
# logger.propagate = False
is_py2
=
sys
.
version
[
0
]
==
'
2
'
if
is_py2
:
import
Queue
as
queue
else
:
import
queue
as
queue
class
DiskAudio
(
Base
):
def
__init__
(
self
,
data
,
labels
,
...
...
@@ -62,7 +68,7 @@ class DiskAudio(Base):
self
.
max_queue_size
=
20000
# a flexible queue that stores audio frames extracted from files
self
.
frames_storage
=
Queue
(
self
.
max_queue_size
)
self
.
frames_storage
=
queue
.
Queue
(
self
.
max_queue_size
)
# a similar queue for the corresponding labels
self
.
labels_storage
=
[]
...
...
@@ -120,7 +126,7 @@ class DiskAudio(Base):
# so, we want exit current datashuffling thread if cur_index reached the end of the file list
if
self
.
cur_index
>=
self
.
indices
.
shape
[
0
]
and
len
(
self
.
labels_storage
)
<
self
.
batch_size
:
# reset everything
self
.
frames_storage
=
Queue
(
self
.
max_queue_size
)
self
.
frames_storage
=
queue
.
Queue
(
self
.
max_queue_size
)
self
.
labels_storage
=
[]
self
.
cur_index
=
0
self
.
data_finished
=
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment