DiagLinear

class behavenet.models.base.DiagLinear(features, bias=True)[source]

Bases: Module

Applies a diagonal linear transformation to the incoming data: \(y = xD^T + b\)

Methods Summary

extra_repr()

Set the extra representation of the module

forward(input)

Defines the computation performed at every call.

reset_parameters()

Methods Documentation

extra_repr()[source]

Set the extra representation of the module

To print customized extra information, you should reimplement this method in your own modules. Both single-line and multi-line strings are acceptable.

forward(input)[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.

reset_parameters()[source]