Class: TorchAudio::Transforms::ComputeDeltas

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

Instance Method Summary collapse

Constructor Details

#initialize(win_length: 5, mode: "replicate") ⇒ ComputeDeltas

Returns a new instance of ComputeDeltas.



4
5
6
7
8
# File 'lib/torchaudio/transforms/compute_deltas.rb', line 4

def initialize(win_length: 5, mode: "replicate")
  super()
  @win_length = win_length
  @mode = mode
end

Instance Method Details

#forward(specgram) ⇒ Object



10
11
12
# File 'lib/torchaudio/transforms/compute_deltas.rb', line 10

def forward(specgram)
  F.compute_deltas(specgram, win_length: @win_length, mode: @mode)
end