Skip to content

Model

ONNX export metadata, ScholaModel , and related helpers for policies trained with Schola.

Name Description
model.fix_slice_nodes_for_onnx Fix Slice nodes produced by torch.onnx.export that use invalid 0-D tensor inputs.
model.patch_lstm_layers_for_onnx_export Attach forward hooks so ONNX-exported LSTM hidden states match PyTorch.
model.reshape_lstm_output_hook Reshape LSTM hidden states during ONNX export so hn / cn match PyTorch layouts.
ScholaModel A PyTorch Module that is compatible with Schola inference.
StatefulModelMixin Mixin for models that expose non-observation internal state (e.g.
StateMetadata Metadata for recurrent or sequential state tensors in ONNX export.