8000 GitHub - tonyfettes/torch.mbt
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tonyfettes/torch.mbt

Repository files navigation

tonyfettes/torch

PyTorch-like tensor operations implemented in MoonBit.

Usage

  1. Add tonyfettes/torch module as a dependencies

    moon add tonyfettes/torch
  2. Import tonyfettes/torch package.

    {
      "import": {
        "tonyfettes/torch"
      }
    }
  3. Use it in your package

    fn main {
      let tensor = @torch.tensor(1.0)
      println("\{tensor}")
    }

Roadmap

  • Monofy Tensor for every dtype (bool, i8, i16, i32, f32, f64)
  • PyTorch tensor operations
    • torch.transpose
    • torch.argmax
  • PyTorch module
  • torch.nn.init
    • torch.nn.init.uniform_
    • torch.nn.init.normal_
    • torch.nn.init.xavier_uniform_
  • Negative index support for view, etc.
  • PyTorch functional module
    • torch.nn.functional.rms_norm
    • torch.nn.functional.silu
  • Module/model saving and loading
    • Static JSON format.
    • Dynamic JSON format. "Dynamic" means saving/loading a trait object (Module here)
    • Binary format
  • Computation graph optimization
    • Get operation fusing
    • Make Sum operate on Array[Tensor] directly
    • Eliminate Cat(Get(...))
  • Loss
  • Distributions
    • re-parametrization trick
    • entropy
    • Normal::log_prob
  • Adam* optimizers
  • WASM-SIMD v128

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0