CLASS relax.docs.CustomizedMarkdownRenderer(sym, name=None, title_level=3)
Displaying documents of functions, classes, haiku.module, and BaseParser.
CustomizedMarkdownRenderer is the customized markdown render for the ReLax documentation site. We can use it to displaying documents of functions, classes, haiku.module, and BaseParser.
We can display documentations for functions:
def validate_config( configs: Dict|BaseParser, # A configuration of the model/data. config_cls: BaseParser # The desired configuration class.) -> BaseParser:"""Return a valid configuration object.""" ...CustomizedMarkdownRenderer(validate_config)
VALIDATE_CONFIG
validate_config(configs, config_cls)
Return a valid configuration object.
Parameters:
configs (Dict | BaseParser) – A configuration of the model/data.
config_cls (BaseParser) – The desired configuration class.
Returns:
(BaseParser)
We can display documentations for classes:
class VanillaCF:"""VanillaCF Explanation of the model."""def__init__(self, configs: Dict|BaseParser=None# A configuration of the model. ): ...CustomizedMarkdownRenderer(VanillaCF)
CLASS relax.methods.vanilla.VanillaCF(configs=None)
VanillaCF Explanation of the model.
Parameters:
configs (Dict | BaseParser, default=None) – A configuration of the model.
We can display documentations for BaseParser:
class VanillaCFConfig(BaseParser):"""Configuration for the `Model`.""" lr: float= Field(1e-3, description="Learning rate.") n_steps: int= Field(100, description="Number of iteration steps.")CustomizedMarkdownRenderer(VanillaCFConfig)
CLASS relax.methods.vanilla.VanillaCFConfig(lr=0.001, n_steps=100)
Configuration for the Model.
Parameters:
lr (float, default=0.001) – Learning rate.
n_steps (int, default=100) – Number of iteration steps.
class Model(hk.Module):"""A basic predictive model for binary classification."""def__init__(self, sizes: List[int], # Sequence of layer sizes. dropout_rate: float=0.3, # Dropout rate. name: Optional[str] =None, # Name of the module. ): ...CustomizedMarkdownRenderer(Model)
MODEL
CLASS Model(sizes, dropout_rate=0.3, name=None)
A basic predictive model for binary classification.
Parameters:
sizes (List[int]) – Sequence of layer sizes.
dropout_rate (float, default=0.3) – Dropout rate.
name (Optional[str], default=None) – Name of the module.