Class: TorchVision::Transforms::Resize

Inherits:
Torch::NN::Module
  • Object
show all
Defined in:
lib/torchvision/transforms/resize.rb

Instance Method Summary collapse

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