Class: TorchVision::Transforms::Resize
- Inherits:
-
Torch::NN::Module
- Object
- Torch::NN::Module
- TorchVision::Transforms::Resize
- Defined in:
- lib/torchvision/transforms/resize.rb
Instance Method Summary collapse
- #forward(img) ⇒ Object
-
#initialize(size) ⇒ Resize
constructor
A new instance of Resize.
Constructor Details
#initialize(size) ⇒ Resize
Returns a new instance of Resize.
4 5 6 |
# File 'lib/torchvision/transforms/resize.rb', line 4 def initialize(size) @size = size end |
Instance Method Details
#forward(img) ⇒ Object
8 9 10 |
# File 'lib/torchvision/transforms/resize.rb', line 8 def forward(img) F.resize(img, @size) end |