syna.functions.loss module

class syna.functions.loss.MeanSquaredError[source]

Bases: Function

Mean squared error over the batch.

backward(gy)[source]
forward(x0, x1)[source]
class syna.functions.loss.SoftmaxCrossEntropy[source]

Bases: Function

Softmax cross entropy (expects integer class labels t).

backward(gy)[source]
forward(x, t)[source]
syna.functions.loss.accuracy(y, t) Tensor[source]

Compute classification accuracy: mean(pred == t).

syna.functions.loss.mean_squared_error(x0, x1) Tensor[source]

Mean squared error between x0 and x1.

syna.functions.loss.mean_squared_error_simple(x0, x1)[source]

Simple mean squared error (for convenience).

syna.functions.loss.softmax_cross_entropy(x, t) Tensor[source]

Softmax cross entropy between logits x and labels t.

syna.functions.loss.softmax_cross_entropy_simple(x, t) Tensor[source]

Simple softmax cross entropy using explicit softmax and log clipping.