Browse Source

fix codex&cpplint&pylint

pull/14775/head
xiefangqi 4 years ago
parent
commit
db43f196a7
4 changed files with 8 additions and 3 deletions
  1. +5
    -1
      mindspore/ccsrc/minddata/dataset/core/data_type.cc
  2. +1
    -0
      mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/cpu_map_job.cc
  3. +1
    -1
      mindspore/ccsrc/minddata/dataset/util/rdr.h
  4. +1
    -1
      model_zoo/official/cv/faster_rcnn/src/dataset.py

+ 5
- 1
mindspore/ccsrc/minddata/dataset/core/data_type.cc View File

@@ -51,7 +51,11 @@ uint8_t DataType::AsCVType() const {
} }


if (res == kCVInvalidType) { if (res == kCVInvalidType) {
std::string err_msg = "Cannot convert [" + std::string(kTypeInfo[type_].name_) + "] to OpenCV type.";
std::string type_name = "unknown";
if (type_ < DataType::NUM_OF_TYPES) {
type_name = std::string(kTypeInfo[type_].name_);
}
std::string err_msg = "Cannot convert [" + type_name + "] to OpenCV type.";
err_msg += " Currently unsupported data type: [uint32, int64, uint64, string]"; err_msg += " Currently unsupported data type: [uint32, int64, uint64, string]";
MS_LOG(ERROR) << err_msg; MS_LOG(ERROR) << err_msg;
} }


+ 1
- 0
mindspore/ccsrc/minddata/dataset/engine/datasetops/map_op/cpu_map_job.cc View File

@@ -18,6 +18,7 @@
#include <vector> #include <vector>
#include <utility> #include <utility>
#include <set> #include <set>
#include <string>
#include "minddata/dataset/engine/datasetops/map_op/cpu_map_job.h" #include "minddata/dataset/engine/datasetops/map_op/cpu_map_job.h"


namespace mindspore { namespace mindspore {


+ 1
- 1
mindspore/ccsrc/minddata/dataset/util/rdr.h View File

@@ -24,7 +24,7 @@ namespace mindspore {
namespace dataset { namespace dataset {
class MDChannelInfo { class MDChannelInfo {
public: public:
explicit MDChannelInfo(std::string channel_name) : channel_name_(channel_name) {}
explicit MDChannelInfo(std::string channel_name) : channel_name_(channel_name), preprocess_batch_(0) {}


~MDChannelInfo() = default; ~MDChannelInfo() = default;




+ 1
- 1
model_zoo/official/cv/faster_rcnn/src/dataset.py View File

@@ -20,12 +20,12 @@ import os
import numpy as np import numpy as np
from numpy import random from numpy import random


import cv2
import mmcv import mmcv
import mindspore.dataset as de import mindspore.dataset as de
import mindspore.dataset.vision.c_transforms as C import mindspore.dataset.vision.c_transforms as C
from mindspore.mindrecord import FileWriter from mindspore.mindrecord import FileWriter
from src.config import config from src.config import config
import cv2




def bbox_overlaps(bboxes1, bboxes2, mode='iou'): def bbox_overlaps(bboxes1, bboxes2, mode='iou'):


Loading…
Cancel
Save