aitune.torch.module.passthrough_module

View as Markdown

Passthrough module.

Module Contents

Classes

NameDescription
PassthroughModuleModule that passes through the original module.

API

class aitune.torch.module.passthrough_module.PassthroughModule(
module,
device: str
)

Module that passes through the original module.

Before passing the data this module moves the data to the same device as the module.

_forward_call
= module.__call__
aitune.torch.module.passthrough_module.PassthroughModule.__call__(
args: typing.Any = (),
kwargs: typing.Any = {}
) -> typing.Any

Native inference on wrapped module.

aitune.torch.module.passthrough_module.PassthroughModule._prepare_inputs(
args = (),
kwargs = {}
)

Prepare inputs for inplace inference and place them on the same device if are not.