mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-04 12:20:20 +03:00
Add comment to explain is_distillable
This commit is contained in:
parent
985dd2236c
commit
c7869750ee
|
@ -267,6 +267,10 @@ cdef class TrainablePipe(Pipe):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_distillable(self) -> bool:
|
def is_distillable(self) -> bool:
|
||||||
|
# Normally a pipe overrides `get_teacher_student_loss` to implement
|
||||||
|
# distillation. In more exceptional cases, a pipe can provide its
|
||||||
|
# own `distill` implementation. If neither of these methods is
|
||||||
|
# overridden, the pipe does not implement distillation.
|
||||||
return not (self.__class__.distill is TrainablePipe.distill and self.__class__.get_teacher_student_loss is TrainablePipe.get_teacher_student_loss)
|
return not (self.__class__.distill is TrainablePipe.distill and self.__class__.get_teacher_student_loss is TrainablePipe.get_teacher_student_loss)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue
Block a user