src.models.components package§
Subpackages§
Submodules§
src.models.components.metrics module§
- class src.models.components.metrics.LogLoss(dist_sync_on_step=False)§
Bases:
Metric- compute()§
Override this method to compute the final metric value from state variables synchronized across the distributed backend.
- full_state_update: bool = False§
- update(preds: Tensor, target: Tensor)§
Override this method to update the state variables of your metric class.
- class src.models.components.metrics.MRR(dist_sync_on_step=False, k=None)§
Bases:
Metric- compute()§
Override this method to compute the final metric value from state variables synchronized across the distributed backend.
- full_state_update: bool = False§
- update(preds: Tensor, target: Tensor)§
Override this method to update the state variables of your metric class.
- class src.models.components.metrics.Senti(dist_sync_on_step=False, k=None)§
Bases:
Metric- compute()§
Override this method to compute the final metric value from state variables synchronized across the distributed backend.
- full_state_update: bool = False§
- update(y_pred: Tensor, s_c: Tensor, s_mean: Tensor)§
Override this method to update the state variables of your metric class.
- class src.models.components.metrics.SentiMRR(dist_sync_on_step=False, k=None)§
Bases:
Metric- compute()§
Override this method to compute the final metric value from state variables synchronized across the distributed backend.
- full_state_update: bool = False§
- update(y_pred: Tensor, s_c: Tensor, s_mean: Tensor)§
Override this method to update the state variables of your metric class.
src.models.components.simple_dense_net module§
- class src.models.components.simple_dense_net.SimpleDenseNet(input_size: int = 784, lin1_size: int = 256, lin2_size: int = 256, lin3_size: int = 256, output_size: int = 10)§
Bases:
Module- forward(x)§
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool§
src.models.components.utils module§
- class src.models.components.utils.AdditiveAttention(query_dim, embedding_dim)§
Bases:
Module- forward(input_sequence)§
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool§
- class src.models.components.utils.TimeDistributed(module, batch_first=False)§
Bases:
Module- forward(x)§
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
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
- training: bool§