red-candle 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Cargo.lock +821 -0
- data/Cargo.toml +2 -0
- data/README.md +46 -0
- data/ext/candle/Cargo.toml +13 -0
- data/ext/candle/extconf.rb +4 -0
- data/ext/candle/src/lib.rs +773 -0
- data/lib/candle/version.rb +3 -0
- data/lib/candle.rb +1 -0
- metadata +67 -0
data/Cargo.toml
ADDED
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)
|