Class: TorchAudio::Transforms::MuLawDecoding

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

Instance Method Summary collapse

Constructor Details

#initialize(quantization_channels: 256) ⇒ MuLawDecoding

Returns a new instance of MuLawDecoding.



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

def initialize(quantization_channels: 256)
  super()
  @quantization_channels = quantization_channels
end

Instance Method Details

#forward(x_mu) ⇒ Object



9
10
11
# File 'lib/torchaudio/transforms/mu_law_decoding.rb', line 9

def forward(x_mu)
  F.mu_law_decoding(x_mu, @quantization_channels)
end