Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.

nidl.backbones.volume.utils.SimpleFeaturesInputAdapter

class nidl.backbones.volume.utils.SimpleFeaturesInputAdapter(*args, **kwargs)[source]

Bases: Module

Adapter turning feature vectors (B, D) into sequences of a single token (B, 1, D), e.g. the pooled output of a CNN. It has no weights.

Adapted from https://github.com/Duplums/CoMM.

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.