GithubHelp home page GithubHelp logo

opportunitylivetv / thpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebookarchive/thpp

1.0 3.0 1.0 129 KB

TH++, C++ interface to the torch7 TH library

License: Other

CMake 6.24% C++ 91.69% Shell 1.64% Thrift 0.43%

thpp's Introduction

TH++: A C++ tensor library

TH++ is a C++ tensor library, implemented as a wrapper around the TH library (the low-level tensor library in Torch). There is unfortunately little documentation about TH, but the interface mimics the Lua Tensor interface.

The core of the library is the Tensor<T> class template, where T is a numeric type (usually floating point, float or double). A tensor is a multi-dimensional array, usually in C (row-major) order, but many operations (transpose, slice, etc) are performed by permuting indexes and changing offsets, so the data is no longer contiguous / in row-major order. Read the numpy.ndarray documentation for more details about the strided indexing scheme.

Tensors may also share memory with other tensors; operations that manipulate metadata (select, slice, transpose, etc) will make the destination tensor share memory with the source. To ensure you have a unique copy, call force(Tensor<T>::UNIQUE) on the tensor. Similarly, to ensure you have a contiguous C (row-major) tensor, call force(Tensor<T>::CONTIGUOUS), which may also create a unique copy.

Please see the header file <thpp/Tensor.h> for more details.

thpp's People

Contributors

tudor avatar soumith avatar ebetica avatar adamlerer avatar yfeldblum avatar urikz avatar vgao1996 avatar denisyarats avatar wickedfoo avatar joostvdoorn avatar ma2bd avatar colesbury avatar timlacroix avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

martina6hall

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.