|
|
@ -40,7 +40,6 @@ assert z1.size > 0
|
|
|
|
|
|
|
|
|
|
|
|
y2 = fc_layer(input=y, size=15)
|
|
|
|
y2 = fc_layer(input=y, size=15)
|
|
|
|
z2 = rotate_layer(input=y2, height=5)
|
|
|
|
z2 = rotate_layer(input=y2, height=5)
|
|
|
|
z3 = flip_layer(input=y2, height=3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cos1 = cos_sim(a=x1, b=y1)
|
|
|
|
cos1 = cos_sim(a=x1, b=y1)
|
|
|
|
cos3 = cos_sim(a=x1, b=y2, size=3)
|
|
|
|
cos3 = cos_sim(a=x1, b=y2, size=3)
|
|
|
@ -48,7 +47,7 @@ cos3 = cos_sim(a=x1, b=y2, size=3)
|
|
|
|
linear_comb = linear_comb_layer(weights=x1, vectors=y2, size=3)
|
|
|
|
linear_comb = linear_comb_layer(weights=x1, vectors=y2, size=3)
|
|
|
|
|
|
|
|
|
|
|
|
out = fc_layer(
|
|
|
|
out = fc_layer(
|
|
|
|
input=[cos1, cos3, linear_comb, z, z1, z2, z3],
|
|
|
|
input=[cos1, cos3, linear_comb, z, z1, z2],
|
|
|
|
size=num_classes,
|
|
|
|
size=num_classes,
|
|
|
|
act=SoftmaxActivation())
|
|
|
|
act=SoftmaxActivation())
|
|
|
|
|
|
|
|
|
|
|
|