Dragon - Python API

Styles

Dragon is a computation graph based distributed deep learning framework.

For using it, import as follows:

import dragon

However, it will not help you much because you do not want to learn it.

To resolve this matter, we are concerned to design diverse styles for you:

Dragon

Dragon is initially as a light-weight but professional style.

Native interfaces are encouraged to manipulate the backend engine to perform the computation flexibly with data feeding or fetching.

This style involves the following components:

Caffe

Caffe is the most famous framework for vision.

Our work is very different from the official python wrappers, a.k.a, the PyCaffe, which comes from the exports of BoostPython based on C++ language.

This style involves the following components:

TensorFlow

TensorFlow is an end-to-end open source platform for machine learning.

It is challenging to make a consistency with graph and eager execution while is practical to cover most of TensorFlow operations using our backend. We have designed several simpler mechanisms to equip for our frontend to provide exactly the same inferfaces.

This style involves the following components:

TensorLayer

TensorLayer takes a high-level layer abstraction to build complex models.

Original TensorLayer project is restricted to execute TensorFlow operations, which is also known as a competitive tf-wrapper comparing to tf.keras. We transplant and remake the abstractions to match our engine, while keeping the compatibility with tf-based codes as possible.

This style involves the following components:

PyTorch

PyTorch provides straight-forward operations on research prototyping.

To bridge it, our JIT traces and dispatches the operations, as well as the rewriting of GC (Garbage Collection) to reuse the memories and operators by turns.

We are still working hard to cover the original PyTorch operators, however, a bunch of extended operators in many other frameworks can be used.

This style involves the following components:

Integrations

DALI

DALI is a graph-based framework optimized for data loading, pre-processing and augmentation with cpu or gpu device.

We extend it to work with our backend as an optional data provider, which brings a better performance for both training and inference.

This integration involves the following components:

ONNX

ONNX provides an open source format for AI models.

We extend it to translate our GraphIR for model exchanging and deployment, that contributes a potential compatibility between inference runtimes.

This integration involves the following components:

TensorRT

TensorRT optimizes the AI models for high-performance inference.

We extend it to provide a cuda inference runtime for ONNX models.

This integration involves the following components:

Modules

Module autograph : Native API for dragon.autograph namespace.

Module bitwise : Native API for dragon.bitwise namespace.

Module cuda : Native API for dragon.cuda namespace.

Module distributed : Native API for dragon.distributed namespace.

Module dlpack : Native API for dragon.dlpack namespace.

Module io : Native API for dragon.io namespace.

Module logging : Native API for dragon.logging namespace.

Module losses : Native API for dragon.losses namespace.

Module math : Native API for dragon.math namespace.

Module metrics : Native API for dragon.metrics namespace.

Module nn : Native API for dragon.nn namespace.

Module optimizers : Native API for dragon.optimizers namespace.

Module random : Native API for dragon.random namespace.

Module vision : Native API for dragon.vision namespace.

Module vm.caffe : Virtual API for caffe namespace.

Module vm.caffe.layers : Virtual API for caffe.layers namespace.

Module vm.dali : Virtual API for dali namespace.

Module vm.dali.ops : Virtual API for dali.ops namespace.

Module vm.onnx : Virtual API for onnx namespace.

Module vm.tensorflow : Virtual API for tensorflow namespace.

Module vm.tensorflow.bitwise : Virtual API for tensorflow.bitwise namespace.

Module vm.tensorflow.dtypes : Virtual API for tensorflow.dtypes namespace.

Module vm.tensorflow.keras : Virtual API for tensorflow.keras namespace.

Module vm.tensorflow.linalg : Virtual API for tensorflow.linalg namespace.

Module vm.tensorflow.math : Virtual API for tensorflow.math namespace.

Module vm.tensorflow.nn : Virtual API for tensorflow.nn namespace.

Module vm.tensorflow.random : Virtual API for tensorflow.random namespace.

Module vm.tensorlayer.initializers : Virtual API for tensorlayer.initializers namespace.

Module vm.tensorlayer.layers : Virtual API for tensorlayer.layers namespace.

Module vm.tensorlayer.models : Virtual API for tensorlayer.models namespace.

Module vm.tensorrt.backend : Virtual API for tensorrt.backend namespace.

Module vm.torch : Virtual API for torch namespace.

Module vm.torch.autograd : Virtual API for torch.autograd namespace.

Module vm.torch.distributed : Virtual API for torch.distributed namespace.

Module vm.torch.jit : Virtual API for torch.jit namespace.

Module vm.torch.nn : Virtual API for torch.nn namespace.

Module vm.torch.nn.functional : Virtual API for torch.nn.functional namespace.

Module vm.torch.nn.init : Virtual API for torch.nn.init namespace.

Module vm.torch.onnx : Virtual API for torch.onnx namespace.

Module vm.torch.optim : Virtual API for torch.optim namespace.

Module vm.torch.utils.dlpack : Virtual API for torch.utils.dlpack namespace.

Module vm.torchvision.ops : Virtual API for torchvision.ops namespace.