Module bastionlab.polars.utils
Classes
ApplyAbs()
-
BastionLab internal class used to serialize user-defined functions (UDF) in TorchScript. It uses
torch.nn.Module
and applies abs() to the input value.Initializes internal Module state, shared by both nn.Module and ScriptModule.
Ancestors (in MRO)
- torch.nn.modules.module.Module
Class variables
dump_patches: bool
:training: bool
:Methods
forward(self, x) β> Callable[...,Β Any]
-
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 :class:
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
ApplyBins(bin_size:Β int)
-
BastionLab internal class used to serialize user-defined functions (UDF) in TorchScript. It uses
torch.nn.Module
and stores thebin_size
, which is the aggregation count of the query.Initializes internal Module state, shared by both nn.Module and ScriptModule.
Ancestors (in MRO)
- torch.nn.modules.module.Module
Class variables
dump_patches: bool
:training: bool
:Instance variables
bin_size
- The aggregation size of the query.
Methods
forward(self, x) β> Callable[...,Β Any]
-
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 :class:
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Palettes()
-
Class variables
dict
:
VisTools()
: