'Returns the embedding of the input.'

def embed(self, feed):

    feed = Feed.from_any(feed)
    y = np.empty(self.output_shape(feed.x.shape))
    offset = 0
    for x_batch in feed.batches():
        y_batch = np.array(self._embed_batch(x_batch))
        batch_size = y_batch.shape[0]
        y[offset:(offset + batch_size), ...] = y_batch
        offset += batch_size
    return y
