class jina.helloworld.components.MyEncoder(*args, **kwargs)[source]

Bases: jina.executors.encoders.BaseImageEncoder

Simple Encoder used in jina hello-world, it transforms the original 784-dim vector into a 64-dim vector using a random orthogonal matrix, which is stored and shared in index and query time

encode(data, *args, **kwargs)[source]

data (ndarray) – a B x ([T] x D) numpy ndarray, B is the size of the batch


a B x D numpy ndarray