Source code for hyperion.torch.layers.calibrators

"""
 Copyright 2020 Johns Hopkins University  (Author: Jesus Villalba)
 Apache 2.0  (http://www.apache.org/licenses/LICENSE-2.0)
"""

import torch
import torch.nn as nn


[docs]class LinBinCalibrator(nn.Module):
[docs] def __init__(self, a, b): super().__init__() self.a = a self.b = b
[docs] def forward(self, x): return self.a * x + self.b