kd.nn.ImageTokenizer

kd.nn.ImageTokenizer#

class kauldron.modules.ImageTokenizer(*args, **kwargs)[source]

Bases: Protocol

Interface for modules that convert images into tokens.

Module should take a batch of images and return a corresponding batch of tokens.

Examples include Patchify and PatchifyEmbed.