Note that the number of classes is irrelevant here, but is required to build the
Note that the number of classes is irrelevant here, but is required to build the
network (before loading it). ``_model``, ``_num_classes`` and ``_use_res`` are optional input arguments and will be set automatically. If you want to use ResNet model instead of DltResNet model, set the ``use_res`` input argument to ``True``. This class is the embedding extractor and this style of naming (``preprocessor``), is for compatibility with bob_ framework. In this set, we just need a dummy ``extractor`` in bob_ framework which can be defined in the configuration file in this way:
.. code:: python
from bob.learn.pytorch.extractor.audio import DummyExtractor
from bob.bio.base.extractor import CallableExtractor
extractor = DummyExtractor()
extractor = CallableExtractor(lambda x: x)
extracted_directory = "preprocessed"
skip_extraction = True
You can easily implement your own extractor based on your own network too. Just have
...
...
@@ -73,4 +75,4 @@ a look at the code in ``bob/learn/pytorch/preprocessor/audio``.