Skip to content

supaernova.steps.pae.tf

source package supaernova.steps.pae.tf

Classes

source class TFPAEModel(config: PAEModelStep[Literal['tf']], *args: Any, **kwargs: Any)

Bases : ks.Model

Attributes

  • name Name of the layer (string), set in the constructor.

  • name_scope Returns a tf.name_scope instance for this class.

  • variables Returns the list of all layer variables/weights.

  • submodules Sequence of all sub-modules.

  • dtype The dtype of the layer weights.

  • supports_masking Whether this layer supports computing a mask using compute_mask.

  • dynamic Whether the layer is dynamic (eager-only); set in the constructor.

  • activity_regularizer Optional regularizer function for the output of this layer.

  • input_spec InputSpec instance(s) describing the input format for this layer.

  • weights Returns the list of all layer variables/weights.

  • losses List of losses added using the add_loss() API.

  • input_mask Retrieves the input mask tensor(s) of a layer.

  • output_mask Retrieves the output mask tensor(s) of a layer.

  • input Retrieves the input tensor(s) of a layer.

  • output Retrieves the output tensor(s) of a layer.

  • input_shape Retrieves the input shape(s) of a layer.

  • output_shape Retrieves the output shape(s) of a layer.

  • dtype_policy The dtype policy associated with this layer.

  • compute_dtype The dtype of the layer's computations.

  • variable_dtype Alias of Layer.dtype, the dtype of the weights.

  • inbound_nodes Return Functional API nodes upstream of this layer.

  • outbound_nodes Return Functional API nodes downstream of this layer.

  • metrics_names Returns the model's display labels for all outputs.

  • distribute_strategy The tf.distribute.Strategy this model was created under.

  • run_eagerly Settable attribute indicating whether the model should run eagerly.

  • autotune_steps_per_execution Settable property to enable tuning for steps_per_execution

  • steps_per_execution Settable `steps_per_execution variable. Requires a compiled model.

  • jit_compile Specify whether to compile the model with XLA.

  • distribute_reduction_method The method employed to reduce per-replica values during training.

  • state_updates Deprecated, do NOT use!

Methods

source method TFPAEModel.get_config()dict[str, 'Any']

source classmethod TFPAEModel.from_config(config: dict[str, 'Any'])Self

source method TFPAEModel.build_from_config(_config: dict[str, 'Any'])None

source method TFPAEModel.set_seed(seed: int = 0)None

source property TFPAEModel.metrics: list[ks.metrics.Metric]

source property TFPAEModel.val_metrics: list[ks.metrics.Metric]

source method TFPAEModel.call(inputs: EncoderInputs, training: bool | None = None, mask: GenericTensor | None = None)tuple[EncoderOutputs, DecoderOutputs]

source method TFPAEModel.compute_loss(x: GenericTensor | None = None, y: GenericTensor | None = None, y_pred: GenericTensor | None = None, sample_weight: GenericTensor | None = None, training: bool | None = None, mask: GenericTensor | None = None)FTensor[tuple[None]] | None

source method TFPAEModel.train_step(data: GenericTensor, *, dummy: bool = False)dict[str, tf.Tensor | dict[str, tf.Tensor]]

source method TFPAEModel.test_step(data: GenericTensor)dict[str, tf.Tensor | dict[str, tf.Tensor]]

source method TFPAEModel.train_model(stage: PAEStage)None

source method TFPAEModel.build_model(*, update: bool = False)None

source method TFPAEModel.get_loss(loss: str)

source method TFPAEModel.save_checkpoint(savepath: Path)None

source method TFPAEModel.load_checkpoint(loadpath: Path, *, reset_weights: bool | None = None)None

source method TFPAEModel.prep_data_per_epoch(data: EpochInputs)ModelInputs

source method TFPAEModel.recon_error(data: ModelInputs)tuple[tf.Tensor, tf.Tensor, tf.Tensor]