Giter Club home page Giter Club logo

tensor's Introduction

tensor

Inspired by Andrej Karpathy's implementation of 1D tensors, I implemented n-dimensional tensors. Since I am not sure whether a PR (pull request) is needed, I did not submit a PR to his repository. To maintain the integrity of a single file, I did not reuse some code; instead, I copied it directly.

tensor1d.c readme

currently support

  • create tensor
    • create empty tensor using shape
    • create tensor using np.ndarray
  • tensor getitem
    • get a float item
  • tensor nelement
  • tensor.item()
  • get tensor meta data
    • ndim
    • shape

currently testing

  • slice tensor
  • slice tensor keepdim

TODOs:

  • feature
    • create tensor using list, tuple
    • get tensor item as tensor
    • slice tensor
    • slice tensor keepdim
    • tensor_setitem()
    • tensor_slice_setitem()
  • make tests better
  • make the code more readable and cleaner
  • write a post to explain my implementation and help greeners approach this comfortable

Good related resources:

License

MIT

tensor's People

Contributors

karpathy avatar gordicaleksa avatar jake-song 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.