Browse Source

remove unused args & fix pylint warning

tags/v0.3.0-alpha
shijianning 5 years ago
parent
commit
710a0e817b
3 changed files with 5 additions and 5 deletions
  1. +1
    -1
      example/ssd_coco2017/dataset.py
  2. +3
    -3
      example/yolov3_coco2017/train.py
  3. +1
    -1
      mindspore/_akg/add_path.py

+ 1
- 1
example/ssd_coco2017/dataset.py View File

@@ -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]


+ 3
- 3
example/yolov3_coco2017/train.py View File

@@ -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()))


+ 1
- 1
mindspore/_akg/add_path.py View File

@@ -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:]


Loading…
Cancel
Save