pydbm.loss package

Submodules

pydbm.loss.cross_entropy module

class pydbm.loss.cross_entropy.CrossEntropy

Bases: pydbm.rnn.loss.interface.computable_loss.ComputableLoss

Cross Entropy.

compute_delta()

Backward delta.

Parameters:
  • pred_arr – Predicted data.
  • labeled_arr – Labeled data.
  • delta_output – Delta.
Returns:

Delta.

compute_loss()

Return of result from this Cost function.

Parameters:
  • pred_arr – Predicted data.
  • labeled_arr – Labeled data.
  • axis – Axis or axes along which the losses are computed. The default is to compute the losses of the flattened array.
Returns:

Cost.

pydbm.loss.mean_squared_error module

class pydbm.loss.mean_squared_error.MeanSquaredError

Bases: pydbm.rnn.loss.interface.computable_loss.ComputableLoss

The mean squared error (MSE).

compute_delta()

Backward delta.

Parameters:
  • pred_arr – Predicted data.
  • labeled_arr – Labeled data.
  • delta_output – Delta.
Returns:

Delta.

compute_loss()

Return of result from this Cost function.

Parameters:
  • pred_arr – Predicted data.
  • labeled_arr – Labeled data.
  • axis – Axis or axes along which the losses are computed. The default is to compute the losses of the flattened array.
Returns:

Cost.

Module contents