/Libtorch-UE5

Integrate LibTorch Unreal to create and use neural networks without leveraging Python.

Primary LanguageC++MIT LicenseMIT


Logo

ATUM

Harnessing the power of ML inside UE

Contributors Forks Stargazers Issues MIT License                                                                                                              

Table of Contents
  1. About the Plugin
  2. Getting Started
  3. Usage
  4. License

About the Plugin

ATUM is an experimental plugin which enables developers to use machine learning inside Unreal Engine's environment. It is currently the only solution which does not force the user to integrate Python into their workflow.

With ATUM you can:

  • Design neural networks inside the editor
  • Perform operations using tensors
  • Save & load your models to and from files
  • Create custom layers, optimisers and tensors
  • Use every feature in both C++ and Blueprints

(back to top)

Getting Started

In order for this plugin to work, additional files which are not present in this repository are required. Those files can be accessed from the official PyTorch website.

Prerequisites

  • OS: Windows - 64 bit
  • UE: version 5.2+
  • GPU support is currently CUDA-only

Installation

  1. Download the release version of LibTorch
  2. Extract the include and lib folders
  3. In your UE project, create a folder Plugins if it doesn't exist
  4. Inside it create another folder called Atum if it doesn't exist
  5. Clone this repository and move the files inside the Atum folder
  6. Go to Source/ThirdParty/LibTorch/Win64
  7. Replace include and lib with the extracted folders from step 2
  8. Go to include/torch/csrc/api/include/torch/enum.h
  9. Find the following line of code
    TORCH_API extern const enumtype::k##name k##name;
  10. Remove TORCH_API extern from the aforementioned line of code
  11. Go to include/torch/csrc/api/include/torch/nn/module.h
  12. Find the Module class
  13. Add the following line of code inside it
    friend class IAtumLayer;

(back to top)

Usage

Check out the project at https://github.com/bUsernameIsUnavailable/CartPole

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)