reagent.net_builder.slate_ranking package

Submodules

reagent.net_builder.slate_ranking.slate_ranking_scorer module

class reagent.net_builder.slate_ranking.slate_ranking_scorer.FinalLayer(score_cap: Optional[float] = None, sigmoid: bool = False, tanh: bool = False)

Bases: object

get()
score_cap: Optional[float] = None
sigmoid: bool = False
tanh: bool = False
class reagent.net_builder.slate_ranking.slate_ranking_scorer.ScoreCap(cap: float)

Bases: torch.nn.modules.module.Module

forward(input)

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.

training: bool
class reagent.net_builder.slate_ranking.slate_ranking_scorer.SlateRankingScorer(hidden_layers: List[int] = <factory>, activations: List[str] = <factory>, use_batch_norm: bool = False, min_std: float = 0.0, dropout_ratio: float = 0.0, use_layer_norm: bool = False, normalize_output: bool = False, orthogonal_init: bool = False, has_user_feat: bool = False, final_layer: reagent.net_builder.slate_ranking.slate_ranking_scorer.FinalLayer = <factory>)

Bases: reagent.net_builder.slate_ranking_net_builder.SlateRankingNetBuilder

activations: List[str]
build_slate_ranking_network(state_dim, candidate_dim, _candidate_size=None, _slate_size=None) reagent.models.base.ModelBase
dropout_ratio: float = 0.0
final_layer: reagent.net_builder.slate_ranking.slate_ranking_scorer.FinalLayer
has_user_feat: bool = False
hidden_layers: List[int]
min_std: float = 0.0
normalize_output: bool = False
orthogonal_init: bool = False
use_batch_norm: bool = False
use_layer_norm: bool = False

reagent.net_builder.slate_ranking.slate_ranking_transformer module

class reagent.net_builder.slate_ranking.slate_ranking_transformer.SlateRankingTransformer(output_arch: reagent.model_utils.seq2slate_utils.Seq2SlateOutputArch = <Seq2SlateOutputArch.AUTOREGRESSIVE: 'autoregressive'>, temperature: float = 1.0, transformer: reagent.core.parameters.TransformerParameters = <factory>)

Bases: reagent.net_builder.slate_ranking_net_builder.SlateRankingNetBuilder

build_slate_ranking_network(state_dim, candidate_dim, candidate_size, slate_size) reagent.models.base.ModelBase
output_arch: reagent.model_utils.seq2slate_utils.Seq2SlateOutputArch = 'autoregressive'
temperature: float = 1.0
transformer: reagent.core.parameters.TransformerParameters

Module contents

class reagent.net_builder.slate_ranking.SlateRankingNetBuilder__Union(SlateRankingTransformer: Optional[reagent.net_builder.slate_ranking.slate_ranking_transformer.SlateRankingTransformer] = None, SlateRankingScorer: Optional[reagent.net_builder.slate_ranking.slate_ranking_scorer.SlateRankingScorer] = None)

Bases: reagent.core.tagged_union.TaggedUnion

SlateRankingScorer: Optional[reagent.net_builder.slate_ranking.slate_ranking_scorer.SlateRankingScorer] = None
SlateRankingTransformer: Optional[reagent.net_builder.slate_ranking.slate_ranking_transformer.SlateRankingTransformer] = None