To make TensorLayerX simple, we minimize the number of cost functions as much as we can. For more complex loss function, TensorFlow(MindSpore, PaddlePaddle, PyTorch) API will be required.
Note
Please refer to Getting Started for getting specific weights for weight regularization.
tensorlayerx.losses
softmax_cross_entropy_with_logits sigmoid_cross_entropy binary_cross_entropy mean_squared_error normalized_mean_square_error absolute_difference_error dice_coe dice_hard_coe iou_coe cross_entropy_seq cross_entropy_seq_with_mask cosine_similarity li_regularizer lo_regularizer maxnorm_regularizer maxnorm_o_regularizer maxnorm_i_regularizer
softmax_cross_entropy_with_logits
sigmoid_cross_entropy
binary_cross_entropy
mean_squared_error
normalized_mean_square_error
absolute_difference_error
dice_coe
dice_hard_coe
iou_coe
cross_entropy_seq
cross_entropy_seq_with_mask
cosine_similarity
For tf.nn.l2_loss
, tf.contrib.layers.l1_regularizer
, tf.contrib.layers.l2_regularizer
and tf.contrib.layers.sum_regularizer
, see tensorflow API. Maxnorm ^^^^^^^^^^ .. autofunction:: maxnorm_regularizer
li_regularizer
lo_regularizer
maxnorm_o_regularizer
maxnorm_i_regularizer