From e68b18f9a3aa3d7020cecfc2566a05f5b0353dfb Mon Sep 17 00:00:00 2001 From: huangjianhui <852142024@qq.com> Date: Thu, 18 Aug 2022 16:01:46 +0800 Subject: [PATCH] Fix python grammar bug (#128) * Update README.md * Update README.md * Update README.md * Create README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add evaluation calculate time and fix some bugs * Update classification __init__ * Move to ppseg * Add segmentation doc * Add PaddleClas infer.py * Update PaddleClas infer.py * Delete .infer.py.swp * Add PaddleClas infer.cc * Update README.md * Update README.md * Update README.md * Update infer.py * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add PaddleSeg doc and infer.cc demo * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Create segmentation_result.md * Update README.md * Update segmentation_result.md * Update segmentation_result.md * Update segmentation_result.md * Update classification and detection evaluation function * Fix python grammar bug Co-authored-by: Jason --- fastdeploy/vision/detection/contrib/scaled_yolov4.py | 2 +- fastdeploy/vision/detection/contrib/yolor.py | 2 +- fastdeploy/vision/detection/contrib/yolov7.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fastdeploy/vision/detection/contrib/scaled_yolov4.py b/fastdeploy/vision/detection/contrib/scaled_yolov4.py index dad85cde9..29ce6b404 100644 --- a/fastdeploy/vision/detection/contrib/scaled_yolov4.py +++ b/fastdeploy/vision/detection/contrib/scaled_yolov4.py @@ -69,7 +69,7 @@ class ScaledYOLOv4(FastDeployModel): @size.setter def size(self, wh): - assert isinstance(wh, [list, tuple]),\ + assert isinstance(wh, (list, tuple)),\ "The value to set `size` must be type of tuple or list." assert len(wh) == 2,\ "The value to set `size` must contatins 2 elements means [width, height], but now it contains {} elements.".format( diff --git a/fastdeploy/vision/detection/contrib/yolor.py b/fastdeploy/vision/detection/contrib/yolor.py index 6da736aac..44f5128c0 100644 --- a/fastdeploy/vision/detection/contrib/yolor.py +++ b/fastdeploy/vision/detection/contrib/yolor.py @@ -69,7 +69,7 @@ class YOLOR(FastDeployModel): @size.setter def size(self, wh): - assert isinstance(wh, [list, tuple]),\ + assert isinstance(wh, (list, tuple)),\ "The value to set `size` must be type of tuple or list." assert len(wh) == 2,\ "The value to set `size` must contatins 2 elements means [width, height], but now it contains {} elements.".format( diff --git a/fastdeploy/vision/detection/contrib/yolov7.py b/fastdeploy/vision/detection/contrib/yolov7.py index e3437d3b4..a9deb38d3 100644 --- a/fastdeploy/vision/detection/contrib/yolov7.py +++ b/fastdeploy/vision/detection/contrib/yolov7.py @@ -69,7 +69,7 @@ class YOLOv7(FastDeployModel): @size.setter def size(self, wh): - assert isinstance(wh, [list, tuple]),\ + assert isinstance(wh, (list, tuple)),\ "The value to set `size` must be type of tuple or list." assert len(wh) == 2,\ "The value to set `size` must contatins 2 elements means [width, height], but now it contains {} elements.".format(