Browse Source

fix(mge/doc): fix typos, format

GitOrigin-RevId: 7d8037434e
tags/v1.0.0-rc1
Megvii Engine Team 4 years ago
parent
commit
134a102693
7 changed files with 6 additions and 9 deletions
  1. +1
    -1
      python_module/megengine/functional/loss.py
  2. +0
    -4
      python_module/megengine/functional/quantized.py
  3. +1
    -0
      python_module/megengine/module/batchnorm.py
  4. +1
    -1
      scripts/cmake-build/cross_build_android_arm_inference.sh
  5. +1
    -1
      scripts/cmake-build/cross_build_ios_arm_inference.sh
  6. +1
    -1
      scripts/cmake-build/cross_build_linux_arm_inference.sh
  7. +1
    -1
      scripts/cmake-build/host_build.sh

+ 1
- 1
python_module/megengine/functional/loss.py View File

@@ -306,7 +306,7 @@ def hinge_loss(pred: Tensor, label: Tensor, norm: str = "L1") -> Tensor:


The hinge loss can be described as: The hinge loss can be described as:


.. math:: loss(x, y) = \frac{1}{N}\sum_i\sum_j(max(0, 1 - x_i_j*y_i_j))
.. math:: loss(x, y) = \frac{1}{N}\sum_i\sum_j(max(0, 1 - x_{ij}*y_{ij}))


:param pred: The input tensor representing the predicted probability, shape is (N, C). :param pred: The input tensor representing the predicted probability, shape is (N, C).
:param label: The input tensor representing the binary classification label, shape is (N, C). :param label: The input tensor representing the binary classification label, shape is (N, C).


+ 0
- 4
python_module/megengine/functional/quantized.py View File

@@ -47,10 +47,6 @@ def conv_bias_activation(
'CROSS_CORRELATION'. 'CROSS_CORRELATION'.
:param dtype: Support for np.dtype, Default: :param dtype: Support for np.dtype, Default:
np.int8. np.int8.
:param scale: scale if use quantization, Default:
0.0.
:param zero_point: scale if use quantization quint8, Default:
0.0.
:type compute_mode: string or :type compute_mode: string or
:class:`mgb.opr_param_defs.Convolution.ComputeMode` :class:`mgb.opr_param_defs.Convolution.ComputeMode`
:param compute_mode: When set to 'DEFAULT', no special requirements will be :param compute_mode: When set to 'DEFAULT', no special requirements will be


+ 1
- 0
python_module/megengine/module/batchnorm.py View File

@@ -216,6 +216,7 @@ class BatchNorm2d(_BatchNorm):


.. testcode:: .. testcode::


import numpy as np
import megengine as mge import megengine as mge
import megengine.module as M import megengine.module as M




+ 1
- 1
scripts/cmake-build/cross_build_android_arm_inference.sh View File

@@ -13,7 +13,7 @@ echo "EXTRA_CMAKE_ARGS: ${EXTRA_CMAKE_ARGS}"
function usage() { function usage() {
echo "$0 args1 args2 .." echo "$0 args1 args2 .."
echo "available args detail:" echo "available args detail:"
echo "-d : Build with Debug mode, defaule Release mode"
echo "-d : Build with Debug mode, default Release mode"
echo "-f : enable MGE_ARMV8_2_FEATURE_FP16 for ARM64, need toolchain and hardware support" echo "-f : enable MGE_ARMV8_2_FEATURE_FP16 for ARM64, need toolchain and hardware support"
echo "-p : enable MGE_ARMV8_2_FEATURE_DOTPROD for ARM64, need toolchain and hardware support" echo "-p : enable MGE_ARMV8_2_FEATURE_DOTPROD for ARM64, need toolchain and hardware support"
echo "-k : open MGE_DISABLE_FLOAT16 for NEON " echo "-k : open MGE_DISABLE_FLOAT16 for NEON "


+ 1
- 1
scripts/cmake-build/cross_build_ios_arm_inference.sh View File

@@ -13,7 +13,7 @@ echo "EXTRA_CMAKE_ARGS: ${EXTRA_CMAKE_ARGS}"
function usage() { function usage() {
echo "$0 args1 args2 .." echo "$0 args1 args2 .."
echo "available args detail:" echo "available args detail:"
echo "-d : Build with Debug mode, defaule Release mode"
echo "-d : Build with Debug mode, default Release mode"
echo "-f : enable MGE_ARMV8_2_FEATURE_FP16 for ARM64, need toolchain and hardware support" echo "-f : enable MGE_ARMV8_2_FEATURE_FP16 for ARM64, need toolchain and hardware support"
echo "-p : enable MGE_ARMV8_2_FEATURE_DOTPROD for ARM64, need toolchain and hardware support" echo "-p : enable MGE_ARMV8_2_FEATURE_DOTPROD for ARM64, need toolchain and hardware support"
echo "-k : open MGE_DISABLE_FLOAT16 for NEON " echo "-k : open MGE_DISABLE_FLOAT16 for NEON "


+ 1
- 1
scripts/cmake-build/cross_build_linux_arm_inference.sh View File

@@ -13,7 +13,7 @@ echo "EXTRA_CMAKE_ARGS: ${EXTRA_CMAKE_ARGS}"
function usage() { function usage() {
echo "$0 args1 args2 .." echo "$0 args1 args2 .."
echo "available args detail:" echo "available args detail:"
echo "-d : Build with Debug mode, defaule Release mode"
echo "-d : Build with Debug mode, default Release mode"
echo "-f : enable MGE_ARMV8_2_FEATURE_FP16 for ARM64, need toolchain and hardware support" echo "-f : enable MGE_ARMV8_2_FEATURE_FP16 for ARM64, need toolchain and hardware support"
echo "-p : enable MGE_ARMV8_2_FEATURE_DOTPROD for ARM64, need toolchain and hardware support" echo "-p : enable MGE_ARMV8_2_FEATURE_DOTPROD for ARM64, need toolchain and hardware support"
echo "-k : open MGE_DISABLE_FLOAT16 for NEON " echo "-k : open MGE_DISABLE_FLOAT16 for NEON "


+ 1
- 1
scripts/cmake-build/host_build.sh View File

@@ -4,7 +4,7 @@ set -e
function usage() { function usage() {
echo "$0 args1 args2 .." echo "$0 args1 args2 .."
echo "available args detail:" echo "available args detail:"
echo "-d : Build with Debug mode, defaule Release mode"
echo "-d : Build with Debug mode, default Release mode"
echo "-c : Build with CUDA, default without CUDA" echo "-c : Build with CUDA, default without CUDA"
echo "-t : Build with training mode, default inference only" echo "-t : Build with training mode, default inference only"
echo "-m : Build with m32 mode(only for windows build), default m64" echo "-m : Build with m32 mode(only for windows build), default m64"


Loading…
Cancel
Save