torch-rb 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f17982ebcf982b779b2c88dc0ef13a9c94b2e9a6a87007a0c3136ad5f2ef261b
4
- data.tar.gz: d4ddddfc7cbb9baee0e117e36decfe8a757903f876ddcf510db4db53363f7adf
3
+ metadata.gz: fa01dc7cfd168494f1066f4e692eb08dee7f419126b2d10a6eb5b2b22fe01526
4
+ data.tar.gz: 9e69a7da9ecc85c51bd9cfb42b93f1b1aa6148958ed8bc16ffb0555b6d42159d
5
5
  SHA512:
6
- metadata.gz: 00ff39bb405350f0107974b1786bf14ac6ca558744f05653ee2f16445d46f66658f82dcfa069bd3a92b44c33ba642dd196fc29a21379f188111fd7e8648f5eab
7
- data.tar.gz: b66d48682789f71032c1d928174829791df43a04e829ebc241cafab884bc076983323bdffbcb12f5785c6d4614c13d2fed32bb5f20106957a4d6326289b7a1ea
6
+ metadata.gz: 36bc620212235e57a40d9e791b3eae85fbd73c7224a5445e2e94e49c7a3ec4cb638024193d8e47817e577a72ef96976fdf2851f3607fd3ea1712255bca0e1ec1
7
+ data.tar.gz: 888971d06717b610020644ed720ae48fa645a90790d54692ac64a565434b550ce4f778688f0a22806f018656dd9d6183d6510fc458c8c5e82c0629951489279c
@@ -1,3 +1,7 @@
1
+ ## 0.3.4 (2020-08-26)
2
+
3
+ - Added `Torch.clamp` method
4
+
1
5
  ## 0.3.3 (2020-08-25)
2
6
 
3
7
  - Added spectral ops
data/README.md CHANGED
@@ -415,7 +415,7 @@ Here’s the list of compatible versions.
415
415
 
416
416
  Torch.rb | LibTorch
417
417
  --- | ---
418
- 0.3.0-0.3.1 | 1.6.0
418
+ 0.3.0-0.3.4 | 1.6.0
419
419
  0.2.0-0.2.7 | 1.5.0-1.5.1
420
420
  0.1.8 | 1.4.0
421
421
  0.1.0-0.1.7 | 1.3.1
@@ -471,6 +471,11 @@ module Torch
471
471
  _stft(input, n_fft, hop_length, win_length, window, normalized, onesided)
472
472
  end
473
473
 
474
+ def clamp(tensor, min, max)
475
+ tensor = _clamp_min(tensor, min)
476
+ _clamp_max(tensor, max)
477
+ end
478
+
474
479
  private
475
480
 
476
481
  def to_ivalue(obj)
@@ -1,3 +1,3 @@
1
1
  module Torch
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torch-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane