kr.ac.kaist.ir.deep.fn
Objective Function: Cosine Similarity Error
This has a heavy computation. If you want to use lighter one, use DotProductErr
val output = net(input) val err = CosineErr(real, output) val diff = CosineErr.derivative(real, output)
This function returns 1 - cosine similarity, i.e. cosine dissimiarlity.
Compute error (loss)
the expected real output
the computed output of the network
the error
Compute differentiation value of this objective function w.r.t output o
the expected real output, r
r
the computed output of the network, o
o
differentiation value at f(x)=fx, which is a column vector
f(x)=fx
Objective Function: Cosine Similarity Error
This has a heavy computation. If you want to use lighter one, use DotProductErr
This function returns 1 - cosine similarity, i.e. cosine dissimiarlity.