jactorch.quickstart.models#
Classes
Class LinearClassificationModel
- class LinearClassificationModel[source]#
Bases:
MLPClassificationModel
- __init__(input_dim, nr_classes)[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(feed_dict)#
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.
- reset_parameters()#
Class LinearRegressionModel
- class LinearRegressionModel[source]#
Bases:
MLPRegressionModel
- __init__(input_dim, output_dim)[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(feed_dict)#
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.
- reset_parameters()#
Class MLPClassificationModel
- class MLPClassificationModel[source]#
Bases:
MLPModel
,ModelIOKeysMixin
- __init__(input_dim, nr_classes, hidden_dims, batch_norm=None, dropout=None, activation='relu')[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(feed_dict)[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.
- reset_parameters()#
Class MLPModel
- class MLPModel[source]#
Bases:
MLPLayer
- __init__(input_dim, output_dim, hidden_dims, batch_norm=None, dropout=None, activation='relu', flatten=True, last_activation=False)#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(input)#
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.
- reset_parameters()#
Class MLPRegressionModel
- class MLPRegressionModel[source]#
Bases:
MLPModel
,ModelIOKeysMixin
- __init__(input_dim, output_dim, hidden_dims, batch_norm=None, dropout=None, activation='relu')[source]#
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- forward(feed_dict)[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.
- reset_parameters()#
Class ModelIOKeysMixin