|
|
|
|
|
|
Linear layers. |
|
|
|
""" |
|
|
|
|
|
|
|
def __init__(self, input_size: int, num_layers: int, hidden_size: int): |
|
|
|
def __init__( |
|
|
|
self, |
|
|
|
input_size: int, |
|
|
|
num_layers: int, |
|
|
|
hidden_size: int, |
|
|
|
kernel_init: Initialization = Initialization.KaimingHeNormal, |
|
|
|
kernel_gain: float = 1.0, |
|
|
|
): |
|
|
|
kernel_init=Initialization.KaimingHeNormal, |
|
|
|
kernel_gain=1.0, |
|
|
|
kernel_init=kernel_init, |
|
|
|
kernel_gain=kernel_gain, |
|
|
|
) |
|
|
|
] |
|
|
|
self.layers.append(Swish()) |
|
|
|
|
|
|
hidden_size, |
|
|
|
hidden_size, |
|
|
|
kernel_init=Initialization.KaimingHeNormal, |
|
|
|
kernel_gain=1.0, |
|
|
|
kernel_init=kernel_init, |
|
|
|
kernel_gain=kernel_gain, |
|
|
|
) |
|
|
|
) |
|
|
|
self.layers.append(Swish()) |
|
|
|