Skip to content
Snippets Groups Projects
Commit 4e32759e authored by Saeed SARFJOO's avatar Saeed SARFJOO
Browse files

change the extractor name

parent a043c598
No related branches found
No related tags found
1 merge request!19Add audio extractor
Pipeline #26712 canceled
import numpy
from bob.bio.base.extractor import Extractor
class DltResNetExtractor(Extractor):
""" The Dummy class for passing the extracted embedding.
"""
def __init__(self):
""" Init function
"""
super(DltResNetExtractor, self).__init__()
def __call__(self, data):
"""__call__(data) -> feature
This function will actually perform the feature extraction.
It must be overwritten by derived classes.
It takes the (preprocessed) data and returns the features extracted from the data.
**Parameters**
data : object (usually :py:class:`numpy.ndarray`)
The *preprocessed* data from which features should be extracted.
**Returns:**
feature : object (usually :py:class:`numpy.ndarray`)
The extracted feature.
"""
return data
\ No newline at end of file
from .DltResNet import DltResNetExtractor
from .DummyExtractor import DummyExtractor
# gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
......@@ -16,7 +16,7 @@ def __appropriate__(*args):
obj.__module__ = __name__
__appropriate__(
DltResNetExtractor,
DummyExtractor,
)
# gets sphinx autodoc done right - don't remove it
......
# see https://docs.python.org/3/library/pkgutil.html
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__)
# gets sphinx autodoc done right - don't remove it
def __appropriate__(*args):
"""Says object was actually declared here, an not on the import module.
Parameters:
*args: An iterable of objects to modify
Resolves `Sphinx referencing issues
<https://github.com/sphinx-doc/sphinx/issues/3048>`
"""
for obj in args: obj.__module__ = __name__
__appropriate__()
__all__ = [_ for _ in dir() if not _.startswith('_')]
......@@ -63,7 +63,7 @@ network (before loading it). ``_model``, ``_num_classes`` and ``_use_res`` are o
.. code:: python
from bob.learn.pytorch.extractor.audio import DltResNetExtractor as DummyExtractor
from bob.learn.pytorch.extractor.audio import DummyExtractor
extractor = DummyExtractor()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment