• Docs >
  • quaterion_models.modules.simple module
Shortcuts

quaterion_models.modules.simple module

class ActivationFromFnName(activation_fn: str)[source]

Bases: Module

Simple module constructed from function name to be used in nn.Sequential

Construct a nn.Module that applies the specified activation function to inputs

Parameters:

activation_fn – Name of the activation function to apply to input. Must be an attribute of torch.nn.functional.

forward(inputs: Tensor) Tensor[source]

Defines 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.

training: bool

Qdrant

Learn more about Qdrant vector search project and ecosystem

Discover Qdrant

Similarity Learning

Explore practical problem solving with Similarity Learning

Learn Similarity Learning

Community

Find people dealing with similar problems and get answers to your questions

Join Community