From: @zhang_yi2020 Reviewed-by: @liangchenghui,@wuxuejian Signed-off-by: @liangchenghuitags/v1.2.0-rc1
| @@ -229,10 +229,10 @@ class XavierUniform(Initializer): | |||||
| Initialize the array with xavier uniform algorithm, and from a uniform distribution collect samples within | Initialize the array with xavier uniform algorithm, and from a uniform distribution collect samples within | ||||
| U[-boundary, boundary] The boundary is defined as : | U[-boundary, boundary] The boundary is defined as : | ||||
| where :math:`boundary = gain * \sqrt{\frac{6}{n_{in} + n_{out}}}`. | |||||
| where :math:`boundary = gain * \sqrt{\frac{6}{n_{in} + n_{out}}}`. | |||||
| where :math:`n_{in}` is the number of input units in the weight tensor. | |||||
| where :math:`n_{out}` is the number of output units in the weight tensor. | |||||
| - where :math:`n_{in}` is the number of input units in the weight tensor. | |||||
| - where :math:`n_{out}` is the number of output units in the weight tensor. | |||||
| Args: | Args: | ||||
| gain (Array): The array to be assigned. Default: 1. | gain (Array): The array to be assigned. Default: 1. | ||||
| @@ -259,7 +259,7 @@ class HeUniform(Initializer): | |||||
| Initialize the array with He kaiming uniform algorithm, and from a uniform distribution collect samples within | Initialize the array with He kaiming uniform algorithm, and from a uniform distribution collect samples within | ||||
| U[-boundary, boundary] The boundary is defined as : | U[-boundary, boundary] The boundary is defined as : | ||||
| where :math:`boundary = \sqrt{\frac{6}{(1 + a^2) \times \text{fan_in}}}`. | |||||
| where :math:`boundary = \sqrt{\frac{6}{(1 + a^2) \times \text{fan_in}}}`. | |||||
| Args: | Args: | ||||
| negative_slope (int, float, bool): Default: 0, used when nonlinearity is 'leaky_relu'. | negative_slope (int, float, bool): Default: 0, used when nonlinearity is 'leaky_relu'. | ||||
| @@ -682,11 +682,11 @@ class ParallelMode: | |||||
| There are five kinds of parallel modes, "STAND_ALONE", "DATA_PARALLEL", | There are five kinds of parallel modes, "STAND_ALONE", "DATA_PARALLEL", | ||||
| "HYBRID_PARALLEL", "SEMI_AUTO_PARALLEL" and "AUTO_PARALLEL". Default: "STAND_ALONE". | "HYBRID_PARALLEL", "SEMI_AUTO_PARALLEL" and "AUTO_PARALLEL". Default: "STAND_ALONE". | ||||
| - STAND_ALONE: Only one processor is working. | |||||
| - DATA_PARALLEL: Distributes the data across different processors. | |||||
| - HYBRID_PARALLEL: Achieves data parallelism and model parallelism manually. | |||||
| - SEMI_AUTO_PARALLEL: Achieves data parallelism and model parallelism by setting parallel strategies. | |||||
| - AUTO_PARALLEL: Achieves parallelism automatically. | |||||
| - STAND_ALONE: Only one processor is working. | |||||
| - DATA_PARALLEL: Distributes the data across different processors. | |||||
| - HYBRID_PARALLEL: Achieves data parallelism and model parallelism manually. | |||||
| - SEMI_AUTO_PARALLEL: Achieves data parallelism and model parallelism by setting parallel strategies. | |||||
| - AUTO_PARALLEL: Achieves parallelism automatically. | |||||
| MODE_LIST: The list of all supported parallel modes. | MODE_LIST: The list of all supported parallel modes. | ||||
| """ | """ | ||||
| @@ -138,7 +138,7 @@ class SummaryCollector(Callback): | |||||
| - tensor_format (Union[str, None]): Customize the export tensor format. Supports ["npy", None]. | - tensor_format (Union[str, None]): Customize the export tensor format. Supports ["npy", None]. | ||||
| Default: None, it means that the tensor is not exported. | Default: None, it means that the tensor is not exported. | ||||
| - npy: export tensor as npy file. | |||||
| - npy: export tensor as npy file. | |||||
| Raises: | Raises: | ||||
| ValueError: If the parameter value is not expected. | ValueError: If the parameter value is not expected. | ||||
| @@ -123,7 +123,7 @@ class SummaryRecord: | |||||
| - tensor_format (Union[str, None]): Customize the export tensor format. Supports ["npy", None]. | - tensor_format (Union[str, None]): Customize the export tensor format. Supports ["npy", None]. | ||||
| Default: None, it means that the tensor is not exported. | Default: None, it means that the tensor is not exported. | ||||
| - npy: export tensor as npy file. | |||||
| - npy: export tensor as npy file. | |||||
| Raises: | Raises: | ||||
| TypeError: If the parameter type is incorrect. | TypeError: If the parameter type is incorrect. | ||||