Skip to main content

PyTorch types

#include "max/c/pytorch/types.h"

Typedefs

M_TorchInputSpec

typedef struct M_TorchInputSpec M_TorchInputSpec

A specification for a TorchScript input.

M_TorchInputSpec defines shapes, ranks, and data types of the inputs for which the model will be compiled. You must create an instance of this for every input of the model, using M_newTorchInputSpec(), and then pass them all to M_setTorchInputSpecs. For example code, see M_newTorchInputSpec().

When you’re done, call M_freeTorchInputSpec().