import torch
from torch import nn


class MonategScaleLayer(nn.Module):

    def __init__(self, num, init_value=1.0):
        super(MonategScaleLayer, self).__init__()
        self.scales = nn.Parameter(torch.FloatTensor([init_value] * num))

    def forward(self, feature, scales_map):
        return feature * self.scales[scales_map]

436493deaa2698bc360bdb10f5ebc382f41bc9fa
<mask token>


class MonategScaleLayer(nn.Module):
    <mask token>
    <mask token>

<mask token>


class MonategScaleLayer(nn.Module):

    def __init__(self, num, init_value=1.0):
        super(MonategScaleLayer, self).__init__()
        self.scales = nn.Parameter(torch.FloatTensor([init_value] * num))
    <mask token>

<mask token>


class MonategScaleLayer(nn.Module):

    def __init__(self, num, init_value=1.0):
        super(MonategScaleLayer, self).__init__()
        self.scales = nn.Parameter(torch.FloatTensor([init_value] * num))

    def forward(self, feature, scales_map):
        return feature * self.scales[scales_map]

import torch
from torch import nn


class MonategScaleLayer(nn.Module):

    def __init__(self, num, init_value=1.0):
        super(MonategScaleLayer, self).__init__()
        self.scales = nn.Parameter(torch.FloatTensor([init_value] * num))

    def forward(self, feature, scales_map):
        return feature * self.scales[scales_map]
