Giter Site home page Giter Site logo

eternal-night-archer / onehotarrays.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fluxml/onehotarrays.jl

0.0 0.0 0.0 133 KB

Memory efficient one-hot array encodings

Home Page: https://fluxml.ai/OneHotArrays.jl/dev/

License: MIT License

Julia 100.00%

onehotarrays.jl's Introduction

OneHotArrays.jl

Documentation Tests

This package provides memory efficient one-hot array encodings. It was originally part of Flux.jl.

julia> using OneHotArrays

julia> m = onehotbatch([10, 20, 30, 10, 10], 10:10:40)
4×5 OneHotMatrix(::Vector{UInt32}) with eltype Bool:
 1      1  1
   1      
     1    
         

julia> dump(m)
OneHotMatrix{UInt32, 4, Vector{UInt32}}
  indices: Array{UInt32}((5,)) UInt32[0x00000001, 0x00000002, 0x00000003, 0x00000001, 0x00000001]

julia> @which rand(100, 4) * m
*(A::AbstractMatrix, B::Union{OneHotArray{var"#s14", L, 1, var"N+1", I}, Base.ReshapedArray{Bool, var"N+1", <:OneHotArray{var"#s14", L, <:Any, <:Any, I}}} where {var"#s14", var"N+1", I}) where L
     @ OneHotArrays ~/.julia/dev/OneHotArrays/src/linalg.jl:7

onehotarrays.jl's People

Contributors

darsnack avatar mcabbott avatar tlipede avatar saransh-cpp avatar carlolucibello avatar touchesir 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.