Module Owl_rllib.Policy

Policies: how a network's output becomes a distribution and an action.

A Gaussian policy stores the unclipped sample, so log-probabilities stay those of the Gaussian; only the action sent to the environment is clipped to the action bounds.

type ('tensor, 'array, 'action) t = {
  1. sample : rng:Random.State.t -> 'tensor -> 'array;
    (*

    one sample per row of the output

    *)
  2. log_prob : 'tensor -> 'tensor -> 'tensor;
    (*

    log_prob output samples, shape [batch; 1]

    *)
  3. entropy : 'tensor -> 'tensor;
  4. actions : 'array -> 'action array;
    (*

    environment actions from samples

    *)
}
module Make (AD : Owl_algodiff_generic_sig.Sig) : sig ... end
module S : sig ... end
module D : sig ... end