red-candle 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Cargo.toml ADDED
@@ -0,0 +1,2 @@
1
+ [workspace]
2
+ members = ["ext/candle"]
data/README.md ADDED
@@ -0,0 +1,46 @@
1
+ # red-candle
2
+
3
+ [![build](https://github.com/kojix2/red-candle/actions/workflows/build.yml/badge.svg)](https://github.com/kojix2/red-candle/actions/workflows/build.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/red-candle.svg)](https://badge.fury.io/rb/red-candle)
5
+
6
+ 🕯️ [candle](https://github.com/huggingface/candle) - Minimalist ML framework - for Ruby
7
+
8
+ ## Usage
9
+
10
+ ```ruby
11
+ require "candle"
12
+
13
+ x = Candle::Tensor.new([1, 2, 3, 4, 5, 6], :i64)
14
+ x = x.reshape([3, 2])
15
+ # [[1., 2.],
16
+ # [3., 4.],
17
+ # [5., 6.]]
18
+ # Tensor[[3, 2], f32]
19
+ ```
20
+
21
+ ## Development
22
+
23
+ FORK IT!
24
+
25
+ ```
26
+ git clone https://github.com/your_name/red-candle
27
+ cd red-candle
28
+ bundle
29
+ bundle exec rake compile
30
+ ```
31
+
32
+ Implemented with [Magnus](https://github.com/matsadler/magnus), with reference to [Polars Ruby](https://github.com/ankane/polars-ruby)
33
+
34
+ Policies
35
+ - The less code, the better.
36
+ - Ideally, the PyPO3 code should work as is.
37
+ - Error handling is minimal.
38
+
39
+ Pull requests are welcome.
40
+
41
+ kojix2 started this project to learn Rust, but does not necessarily have enough time to maintain this library. If you are interested in becoming a project owner or committer, please send me a pull request.
42
+
43
+ ### See Also
44
+
45
+ - [Numo::NArray](https://github.com/ruby-numo/numo-narray)
46
+ - [Cumo](https://github.com/sonots/cumo)
@@ -0,0 +1,13 @@
1
+ [package]
2
+ name = "candle"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+
6
+ [lib]
7
+ crate-type = ["cdylib"]
8
+
9
+ [dependencies]
10
+ candle-core = "0.2"
11
+ candle-nn = "0.2"
12
+ half = "2"
13
+ magnus = "0.6"
@@ -0,0 +1,4 @@
1
+ require 'mkmf'
2
+ require 'rb_sys/mkmf'
3
+
4
+ create_rust_makefile('candle/candle')