diff --git a/example/ssd_coco2017/dataset.py b/example/ssd_coco2017/dataset.py index c725c14e00..b88b22c862 100644 --- a/example/ssd_coco2017/dataset.py +++ b/example/ssd_coco2017/dataset.py @@ -137,7 +137,7 @@ def ssd_bboxes_encode(boxes): num_match_num = np.array([len(np.nonzero(t_label)[0])], dtype=np.int32) return bboxes, t_label.astype(np.int32), num_match_num -def ssd_bboxes_decode(boxes, index, image_shape): +def ssd_bboxes_decode(boxes, index): """Decode predict boxes to [x, y, w, h]""" boxes_t = boxes[index] default_boxes_t = default_boxes[index] diff --git a/example/yolov3_coco2017/train.py b/example/yolov3_coco2017/train.py index a5473feada..5c0d8921ad 100644 --- a/example/yolov3_coco2017/train.py +++ b/example/yolov3_coco2017/train.py @@ -51,9 +51,9 @@ def get_lr(learning_rate, start_step, global_step, decay_step, decay_rate, steps return lr_each_step -def init_net_param(net, init_value='ones'): - """Init:wq the parameters in net.""" - params = net.trainable_params() +def init_net_param(network, init_value='ones'): + """Init:wq the parameters in network.""" + params = network.trainable_params() for p in params: if isinstance(p.data, Tensor) and 'beta' not in p.name and 'gamma' not in p.name and 'bias' not in p.name: p.set_parameter_data(initializer(init_value, p.data.shape(), p.data.dtype())) diff --git a/mindspore/_akg/add_path.py b/mindspore/_akg/add_path.py index a9fd0d4a09..2de2f73e1c 100644 --- a/mindspore/_akg/add_path.py +++ b/mindspore/_akg/add_path.py @@ -31,7 +31,7 @@ def AKGAddPath(): class AKGMetaPathFinder: """class AKGMetaPath finder.""" - def find_module(self, fullname, path=None): + def find_module(self, fullname): """method _akg find module.""" if fullname.startswith("_akg.tvm"): rname = fullname[5:]