You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cost.rst 2.4 kB

4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. API - Cost
  2. ==================
  3. To make TensorLayer simple, we minimize the number of cost functions as much as
  4. we can. So we encourage you to use TensorFlow's function, , see `TensorFlow API <https://www.tensorflow.org/versions/r2.0/api_docs/python/tf>`_.
  5. .. note::
  6. Please refer to `Getting Started <https://github.com/tensorlayer/tensorlayer/tree/master/docs/user>`_ for getting specific weights for weight regularization.
  7. .. automodule:: tensorlayer.cost
  8. .. autosummary::
  9. cross_entropy
  10. sigmoid_cross_entropy
  11. binary_cross_entropy
  12. mean_squared_error
  13. normalized_mean_square_error
  14. absolute_difference_error
  15. dice_coe
  16. dice_hard_coe
  17. iou_coe
  18. cross_entropy_seq
  19. cross_entropy_seq_with_mask
  20. cosine_similarity
  21. li_regularizer
  22. lo_regularizer
  23. maxnorm_regularizer
  24. maxnorm_o_regularizer
  25. maxnorm_i_regularizer
  26. huber_loss
  27. Softmax cross entropy
  28. ----------------------
  29. .. autofunction:: cross_entropy
  30. Sigmoid cross entropy
  31. ----------------------
  32. .. autofunction:: sigmoid_cross_entropy
  33. Binary cross entropy
  34. -------------------------
  35. .. autofunction:: binary_cross_entropy
  36. Mean squared error (L2)
  37. -------------------------
  38. .. autofunction:: mean_squared_error
  39. Normalized mean square error
  40. --------------------------------
  41. .. autofunction:: normalized_mean_square_error
  42. Absolute difference error (L1)
  43. --------------------------------
  44. .. autofunction:: absolute_difference_error
  45. Dice coefficient
  46. -------------------------
  47. .. autofunction:: dice_coe
  48. Hard Dice coefficient
  49. -------------------------
  50. .. autofunction:: dice_hard_coe
  51. IOU coefficient
  52. -------------------------
  53. .. autofunction:: iou_coe
  54. Cross entropy for sequence
  55. -----------------------------
  56. .. autofunction:: cross_entropy_seq
  57. Cross entropy with mask for sequence
  58. ----------------------------------------
  59. .. autofunction:: cross_entropy_seq_with_mask
  60. Cosine similarity
  61. -------------------
  62. .. autofunction:: cosine_similarity
  63. Regularization functions
  64. --------------------------
  65. For ``tf.nn.l2_loss``, ``tf.contrib.layers.l1_regularizer``, ``tf.contrib.layers.l2_regularizer`` and
  66. ``tf.contrib.layers.sum_regularizer``, see tensorflow API.
  67. Maxnorm
  68. ^^^^^^^^^^
  69. .. autofunction:: maxnorm_regularizer
  70. Special
  71. ^^^^^^^^^^
  72. .. autofunction:: li_regularizer
  73. .. autofunction:: lo_regularizer
  74. .. autofunction:: maxnorm_o_regularizer
  75. .. autofunction:: maxnorm_i_regularizer
  76. Huber Loss
  77. ^^^^^^^^^^
  78. .. autofunction:: huber_loss

TensorLayer3.0 是一款兼容多种深度学习框架为计算后端的深度学习库。计划兼容TensorFlow, Pytorch, MindSpore, Paddle.