Giter VIP home page Giter VIP logo

tensorcore.jl's Introduction

TensorCore.jl

Stable CI Codecov

This package is intended as a lightweight foundation for tensor operations across the Julia ecosystem. Currently it exports three operations:

  • hadamard elementwise multiplication, with unicode operator ,
  • tensor product preserves all dimensions, operator , and
  • boxdot contracts neighbouring dimensions, named after the unicode .
julia> using TensorCore

julia> A = [1 2 3; 4 5 6]; B = [7 8 9; 0 10 20];

julia> A ⊙ B  # hadamard(A, B)
2×3 Matrix{Int64}:
 7  16   27
 0  50  120

julia> V = [1, 10];

julia> C = A ⊗ V  # tensor(A, V)
2×3×2 Array{Int64, 3}:
[:, :, 1] =
 1  2  3
 4  5  6

[:, :, 2] =
 10  20  30
 40  50  60

julia> summary(A ⊗ B)
"2×3×2×3 Array{Int64, 4}"

julia> C ⊡ V  # boxdot(C, V)
2×3 Matrix{Int64}:
 101  202  303
 404  505  606

julia> summary(C ⊡ rand(2,5,7))
"2×3×5×7 Array{Float64, 4}"

tensorcore.jl's People

Contributors

mcabbott avatar timholy avatar

Watchers

 avatar

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.