mmrazor
mmrazor copied to clipboard
Please provide use cases or unit tests for align_methods in BaseDistiller
When I was reading the code, I found that the align_methods description was too few, which is not convenient to understand the code. Can you provide use cases or configurations or unit tests for align_methods?
class BaseDistiller(BaseModule, metaclass=ABCMeta):
"""Base Distiller.
In the distillation algorithm, some intermediate results of the teacher
need to be obtained and passed to the student.
For nn.Module's outputs, obtained by pytorch forward hook.
For python function's outputs, obtained by a specific context manager.
Args:
align_functions (dict): The details of the functions which outputs need
to be obtained.
"""
def __init__(self, align_methods=None, **kwargs):
super(BaseDistiller, self).__init__(**kwargs)
And the align_methods parameter name and docstr do not match.
Thanks for your issue. The documentation and examples in this part are not complete enough, and we will improve them as soon as possible.