/torch-gobject

GObject bindings for Torch

Primary LanguageC++GNU Lesser General Public License v2.1LGPL-2.1

GObject Bindings for libtorch

Generated from Declarations.yaml

Requirements

Stability

Definitely not API-stable at all. Most of the API is autogenerated.

Some of the API depends on fixes to gobject-introspection, gjs and pygi

Usage

From GJS-flavour JavaScript:

const { GObject, GLib, Torch } = imports.gi;

const tensor = Torch.linspace_double(1.0, 10.0, 10);
log(tensor.get_tensor_data().deep_unpack());

Use PyTorch from JavaScript! Sort of useless at the moment.

Most of the ATen API is supported. The Torch NN API is not yet supported, but this is being worked on.