Browse Source

add import numpy as np in paddlex/cv/nets/detection/yolo_v3.py, fix link in analysis.md

FlyingQianMM 5 years ago
parent
commit
abfdbd2e03
2 changed files with 4 additions and 2 deletions
  1. 2 2
      docs/apis/analysis.md
  2. 2 0
      paddlex/cv/nets/detection/yolo_v3.py

+ 2 - 2
docs/apis/analysis.md

@@ -27,7 +27,7 @@ Seg分析器的分析接口,完成以下信息的分析统计:
 > * 图像各通道归一化后的均值和方差
 > * 标注图中各类别的数量及比重
 
-[代码示例](https://github.com/PaddlePaddle/PaddleX/examples/multi-channel_remote_sensing/tools/analysis.py)
+[代码示例](https://github.com/PaddlePaddle/PaddleX/blob/develop/examples/multi-channel_remote_sensing/tools/analysis.py)
 
 [统计信息示例](../../examples/multi-channel_remote_sensing/analysis.html#id2)
 
@@ -43,6 +43,6 @@ Seg分析器用于计算图像截断后的均值和方差的接口。
 > > * **clip_max_value** (list): 截断的上限,大于max_val的数值均设为max_val。
 > > * **data_info_file** (str): 在analysis()接口中保存的分析结果文件(名为`train_information.pkl`)的路径。
 
-[代码示例](https://github.com/PaddlePaddle/PaddleX/examples/multi-channel_remote_sensing/tools/cal_clipped_mean_std.py)
+[代码示例](https://github.com/PaddlePaddle/PaddleX/blob/develop/examples/multi-channel_remote_sensing/tools/cal_clipped_mean_std.py)
 
 [计算结果示例](../../examples/multi-channel_remote_sensing/analysis.html#id4)

+ 2 - 0
paddlex/cv/nets/detection/yolo_v3.py

@@ -12,6 +12,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+import numpy as np
+
 import paddle
 from paddle import fluid
 from paddle.fluid.param_attr import ParamAttr