Browse Source

!15455 The formula in the ppl annotation is garbled

From: @lijiaqi0612
Reviewed-by: @zhunaipan,@zh_qh
Signed-off-by: @zh_qh
pull/15455/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
8487ce0c09
11 changed files with 1 additions and 2 deletions
  1. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/base/space_to_depth_base.h
  2. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/space_to_batch_fp32.h
  3. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/gather_parameter.h
  4. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/gatherNd_int8.h
  5. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/gather_int8.h
  6. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/leaky_relu_int8.h
  7. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/sigmoid_int8.h
  8. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/squeeze_int8.h
  9. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/unsqueeze_int8.h
  10. +0
    -0
      mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/space_to_depth_parameter.h
  11. +1
    -2
      mindspore/nn/metrics/perplexity.py

+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/base/space_to_depth_base.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/fp32/space_to_batch_fp32.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/gather_parameter.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/gatherNd_int8.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/gather_int8.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/leaky_relu_int8.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/sigmoid_int8.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/squeeze_int8.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/int8/unsqueeze_int8.h View File


+ 0
- 0
mindspore/ccsrc/backend/kernel_compiler/cpu/nnacl/space_to_depth_parameter.h View File


+ 1
- 2
mindspore/nn/metrics/perplexity.py View File

@@ -25,8 +25,7 @@ class Perplexity(Metric):
sample. A low perplexity indicates the model can predict the sample well. The function is shown as follows:

.. math::
b^{\\big(-\\frac{1}{N} \\sum_{i=1}^N \\log_b q(x_i) \\big)}
= \\exp \\big(-\\frac{1}{N} \\sum_{i=1}^N \\log q(x_i)\\big)
PP(W)=P(w_{1}w_{2}...w_{N})^{-\frac{1}{N}}=\sqrt[N]{\frac{1}{P(w_{1}w_{2}...w_{N})}}

Args:
ignore_label (int): Index of an invalid label to be ignored when counting. If set to `None`, it will include all


Loading…
Cancel
Save