Shortcuts

Class Converter

Class Documentation

class Converter

A Converter is used in order to convert PyObjects/py::object into an IValue or some other representation such as storage.

Public Functions

virtual ~Converter() = default
virtual multipy::optional<at::IValue> toTypeInferredIValue(py::handle input) = 0

Converts a py::handle to an IValue

virtual multipy::optional<py::object> toPyObject(at::IValue ivalue) = 0

Converts an IValue into a py::object

virtual multipy::optional<at::Storage> createStorage(PyObject *obj) = 0

Converts an PyObject into a Storage

virtual multipy::optional<PyObject*> createPyObject(const at::Storage &storage) = 0

Creates a PyObject from storage

virtual multipy::optional<THPDtype*> getTHPDtype(at::ScalarType scalarType) = 0

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources