supaernova.steps.posterior.tf
source package supaernova.steps.posterior.tf
Classes
source class TFPosteriorModel(config: PosteriorModelStep[TFPosteriorModelConfig], *args: Any, **kwargs: Any)
Bases : ks.Model
Attributes
-
name — Name of the layer (string), set in the constructor.
-
name_scope — Returns a
tf.name_scopeinstance 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 —
InputSpecinstance(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. -
metrics — Return metrics added using
compile()oradd_metric(). -
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.Strategythis 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 TFPosteriorModel.call(inputs: PosteriorInputs, training: bool | None = None, mask: TensorCompatible | None = None) → PosteriorOutputs
source method TFPosteriorModel.save_checkpoint(savepath: Path, *, save_map: bool = False, save_hmc: bool = False) → None
source method TFPosteriorModel.load_checkpoint(loadpath: Path, *, load_map: bool = False, load_hmc: bool = False) → None
source method TFPosteriorModel.get_config() → dict[str, 'Any']
source classmethod TFPosteriorModel.from_config(config: dict[str, 'Any']) → Self
source method TFPosteriorModel.set_seed(seed: int = 0) → None
source method TFPosteriorModel.train_model(stages: Sequence[PosteriorMapStage], *, savepath: Path | None = None) → None
source method TFPosteriorModel.vals_and_grads(position)
source method TFPosteriorModel.lbfgs(x)
source method TFPosteriorModel.train_map(stage: PosteriorMapStage, chain: int, chain_total: int, *, savepath: Path | None = None) → None
source method TFPosteriorModel.hmc_train(*, savepath: Path | None = None) → None