Skip to content

Model

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

NameDescription
model.fix_slice_nodes_for_onnxFix Slice nodes produced by torch.onnx.export that use invalid 0-D tensor inputs.
model.patch_lstm_layers_for_onnx_exportAttach forward hooks so ONNX-exported LSTM hidden states match PyTorch.
model.reshape_lstm_output_hookReshape LSTM hidden states during ONNX export so hn / cn match PyTorch layouts.
ScholaModelA PyTorch Module that is compatible with Schola inference.
StatefulModelMixinMixin for models that expose non-observation internal state (e.g.
StateMetadataMetadata for recurrent or sequential state tensors in ONNX export.