jina-ai / jina-hub

An open-registry for hosting Jina executors via container images
Apache License 2.0
104 stars 49 forks source link

ImageTorchEncoder always loads mobilenet_v2 #419

Closed fsal closed 4 years ago

fsal commented 4 years ago

The class ImageTorchEncoder sets 'mobilenet_v2' as default CNN, but the ordering of the variables should be inverted from:

https://github.com/jina-ai/jina-hub/blob/b2f41f7bfe978e9ef8b9688bf3d089114de3734e/encoders/image/ImageTorchEncoder/__init__.py#L47

to

self.model_name = model_name or 'mobilenet_v2'

for proper overriding of the default.

JoanFM commented 4 years ago

Good catch! I would still have just mobilenet_v2 as default parameter in the __init__ ?

fsal commented 4 years ago

Sure, this is probably the best solution!