torchvision 0.1.0 → 0.1.1

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: 19fff61bb461e5fbf850702bf485a442b2013807ac28549bc427e5f3d8c7472b
4
- data.tar.gz: bc8004d2ca26e9022f2fa2b1663277bcedf701729f59aae248058a26e605a5ad
3
+ metadata.gz: c6ae301007e3310dfc378a7f76d24bd71cc048be6156b32d9e0705412817c565
4
+ data.tar.gz: 423aee54316683ddf9d3893e04f8836dd16ade1408f6c046f6d8f6f337a09a46
5
5
  SHA512:
6
- metadata.gz: fbd3d7292efa6ee2fd2c0ff8cb85659d37a19761b4d93a9a4923a9990d7400c849738913db12720e7d232d6fdb180c16f06da0ecc3601a922bf0036beb0b44bd
7
- data.tar.gz: '09b86d6b01f25d43ac65d9c3d0509b3488ed2108d57090553ae46526f841551cbdd16fefce1cb15ea7f326d946e3abb26d777c3c45e23538f8fb7753fdb6fec9'
6
+ metadata.gz: cf9c5a514c2ef42299161f97f077897c11b4708858018ffefcb282d6434003d49555ba54ea93ef0fb9e2f3cafdd7bd4395677e02bdfa5b1dcad4772aaeccc896
7
+ data.tar.gz: 0e01311267e620be6dfbed77724baed42ad9c597a2b5452d762845597ae257932e76848e0069149598743d78dc08b0374b18897ce9a272640eed4a3cec21bbd9
@@ -1,3 +1,7 @@
1
+ ## 0.1.1 (2020-04-28)
2
+
3
+ - Removed `mini_magick` for performance
4
+
1
5
  ## 0.1.0 (2020-04-27)
2
6
 
3
7
  - First release
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  This gem is currently experimental. There may be breaking changes between each release. Please report any issues you experience.
6
6
 
7
+ [![Build Status](https://travis-ci.org/ankane/torchvision.svg?branch=master)](https://travis-ci.org/ankane/torchvision)
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application’s Gemfile:
@@ -1,5 +1,4 @@
1
1
  # dependencies
2
- require "mini_magick"
3
2
  require "numo/narray"
4
3
  require "torch"
5
4
 
@@ -7,6 +6,7 @@ require "torch"
7
6
  require "digest"
8
7
  require "fileutils"
9
8
  require "net/http"
9
+ require "tmpdir"
10
10
 
11
11
  # modules
12
12
  require "torchvision/version"
@@ -43,7 +43,6 @@ module TorchVision
43
43
 
44
44
  def [](index)
45
45
  img = @data[index]
46
- img = MiniMagick::Image.import_pixels(img.numo.to_binary, img.size(0), img.size(1), 8, "gray")
47
46
  img = @transform.call(img) if @transform
48
47
 
49
48
  target = @targets[index].item
@@ -34,7 +34,8 @@ module TorchVision
34
34
 
35
35
  # TODO improve
36
36
  def to_tensor(pic)
37
- Torch.tensor(pic.get_pixels, dtype: :float)
37
+ pic = pic.float
38
+ pic.unsqueeze!(0).div!(255)
38
39
  end
39
40
  end
40
41
  end
@@ -1,3 +1,3 @@
1
1
  module TorchVision
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torchvision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-27 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: mini_magick
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: numo-narray
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +30,14 @@ dependencies:
44
30
  requirements:
45
31
  - - ">="
46
32
  - !ruby/object:Gem::Version
47
- version: 0.2.2
33
+ version: 0.2.3
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: 0.2.2
40
+ version: 0.2.3
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: bundler
57
43
  requirement: !ruby/object:Gem::Requirement