fishy.models.deep.ode¶
Neural Ordinary Differential Equation (ODE) model for spectral classification.
Classes
- class fishy.models.deep.ode.ODE(input_dim: int, output_dim: int, hidden_dim: int = 128, num_layers: int = 4, dropout: float = 0.2, **kwargs)[source]¶
Bases:
ModuleNeural ODE model for spectral classification.
- __init__(input_dim: int, output_dim: int, hidden_dim: int = 128, num_layers: int = 4, dropout: float = 0.2, **kwargs) None[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(x: Tensor) Tensor[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- class fishy.models.deep.ode.ODEFunc(hidden_dim: int, dropout: float = 0.2)[source]¶
Bases:
Module- __init__(hidden_dim: int, dropout: float = 0.2) None[source]¶
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(t: Tensor, x: Tensor) Tensor[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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
s