|
|
|
@ -2628,7 +2628,7 @@ class AverageLayer(LayerBase):
|
|
|
|
|
|
|
|
|
|
@config_layer('cos')
|
|
|
|
|
class CosSimLayer(LayerBase):
|
|
|
|
|
def __init__(self, name, inputs, cos_scale=5, device=None):
|
|
|
|
|
def __init__(self, name, inputs, cos_scale=1, device=None):
|
|
|
|
|
super(CosSimLayer, self).__init__(
|
|
|
|
|
name, 'cos', 1, inputs=inputs, device=device)
|
|
|
|
|
config_assert(len(self.inputs) == 2, 'CosSimLayer must have 2 inputs')
|
|
|
|
|