Add the possibility to pass a pre-loaded model into embedding base classes.
In some cases, deep learning models are instantiated inside of other packages, and it is not possible to pass the paths of the model to be loaded inside of the classes. For these cases, we should add a model
parameter to the base class constructors, and simply store the models internally, i.e.:
https://gitlab.idiap.ch/bob/bob.bio.face/-/blob/5c0811270bc6129df64cc3a0ef10c35c64010b65/bob/bio/face/embeddings/pytorch.py#L42 https://gitlab.idiap.ch/bob/bob.bio.face/-/blob/5c0811270bc6129df64cc3a0ef10c35c64010b65/bob/bio/face/embeddings/mxnet.py#L33 https://gitlab.idiap.ch/bob/bob.bio.face/-/blob/5c0811270bc6129df64cc3a0ef10c35c64010b65/bob/bio/face/embeddings/tensorflow.py#L53
As the transform
function always checks if the model is loaded, no further adaptations need to be done. Test code should be implemented, though.